Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(165)

Unified Diff: Source/bindings/v8/custom/V8PromiseCustom.cpp

Issue 23601032: Pass isolate to ScopedPersistent constructor (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Update deprecated generator as well Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/bindings/v8/custom/V8PromiseCustom.cpp
diff --git a/Source/bindings/v8/custom/V8PromiseCustom.cpp b/Source/bindings/v8/custom/V8PromiseCustom.cpp
index e77c4a267c1a43d0514f6b0922ebbed719b40e60..c9dbdb7848713d8117c1b0c5a1f32fbddec15353 100644
--- a/Source/bindings/v8/custom/V8PromiseCustom.cpp
+++ b/Source/bindings/v8/custom/V8PromiseCustom.cpp
@@ -97,10 +97,10 @@ v8::Local<v8::ObjectTemplate> internalObjectTemplate(v8::Isolate* isolate)
class PromiseTask : public ScriptExecutionContext::Task {
public:
- PromiseTask(v8::Handle<v8::Function> callback, v8::Handle<v8::Object> receiver, v8::Handle<v8::Value> result)
- : m_callback(callback)
- , m_receiver(receiver)
- , m_result(result)
+ PromiseTask(v8::Handle<v8::Function> callback, v8::Handle<v8::Object> receiver, v8::Handle<v8::Value> result, v8::Isolate* isolate)
+ : m_callback(isolate, callback)
+ , m_receiver(isolate, receiver)
+ , m_result(isolate, result)
{
ASSERT(!m_callback.isEmpty());
ASSERT(!m_receiver.isEmpty());
@@ -143,7 +143,7 @@ v8::Handle<v8::Value> postTask(v8::Handle<v8::Function> callback, v8::Handle<v8:
{
ScriptExecutionContext* scriptExecutionContext = getScriptExecutionContext();
ASSERT(scriptExecutionContext && scriptExecutionContext->isContextThread());
- scriptExecutionContext->postTask(adoptPtr(new PromiseTask(callback, receiver, value)));
+ scriptExecutionContext->postTask(adoptPtr(new PromiseTask(callback, receiver, value, isolate)));
return v8::Undefined(isolate);
}

Powered by Google App Engine
This is Rietveld 408576698