Index: Source/bindings/v8/ScriptPromise.cpp |
diff --git a/Source/bindings/v8/ScriptPromise.cpp b/Source/bindings/v8/ScriptPromise.cpp |
index 11865ee4854c9fd76b572354a85ebfa60b06eca2..cdeeb0586de15f19c3555019e0ae9e7d00be498e 100644 |
--- a/Source/bindings/v8/ScriptPromise.cpp |
+++ b/Source/bindings/v8/ScriptPromise.cpp |
@@ -67,13 +67,13 @@ ScriptPromise::ScriptPromise(ScriptState* scriptState, v8::Handle<v8::Value> val |
ScriptPromise ScriptPromise::then(PassOwnPtr<ScriptFunction> onFulfilled, PassOwnPtr<ScriptFunction> onRejected) |
{ |
+ v8::Local<v8::Function> v8OnFulfilled = ScriptFunction::adoptByGarbageCollector(onFulfilled); |
+ v8::Local<v8::Function> v8OnRejected = ScriptFunction::adoptByGarbageCollector(onRejected); |
haraken
2014/06/17 00:51:55
Would you elaborate on this change? It seems a bit
falken
2014/06/17 01:07:51
The destructor of PassOwnPtr deletes the ScriptFun
haraken
2014/06/17 01:15:25
Thanks for the details; that ASSERT doesn't make m
|
+ |
if (m_promise.isEmpty()) |
return ScriptPromise(); |
v8::Local<v8::Object> promise = m_promise.v8Value().As<v8::Object>(); |
- v8::Local<v8::Function> v8OnFulfilled = ScriptFunction::adoptByGarbageCollector(onFulfilled); |
- v8::Local<v8::Function> v8OnRejected = ScriptFunction::adoptByGarbageCollector(onRejected); |
- |
ASSERT(promise->IsPromise()); |
// Return this Promise if no handlers are given. |
// In fact it is not the exact bahavior of Promise.prototype.then |