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

Unified Diff: third_party/WebKit/Source/bindings/core/v8/V8LazyEventListener.cpp

Issue 1419313003: Track the script state a listener was created in (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 1 month 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: third_party/WebKit/Source/bindings/core/v8/V8LazyEventListener.cpp
diff --git a/third_party/WebKit/Source/bindings/core/v8/V8LazyEventListener.cpp b/third_party/WebKit/Source/bindings/core/v8/V8LazyEventListener.cpp
index 4ae87b714d62219ec8d7106408cc15409be0d0f6..d5a989d40b9c93a045ef184376ab7e9cde65df35 100644
--- a/third_party/WebKit/Source/bindings/core/v8/V8LazyEventListener.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/V8LazyEventListener.cpp
@@ -105,7 +105,7 @@ v8::Local<v8::Value> V8LazyEventListener::callListenerFunction(ScriptState* scri
static void V8LazyEventListenerToString(const v8::FunctionCallbackInfo<v8::Value>& info)
{
- v8SetReturnValue(info, V8HiddenValue::getHiddenValue(info.GetIsolate(), info.Holder(), V8HiddenValue::toStringString(info.GetIsolate())));
+ v8SetReturnValue(info, V8HiddenValue::getHiddenValue(ScriptState::current(info.GetIsolate()), info.Holder(), V8HiddenValue::toStringString(info.GetIsolate())));
}
void V8LazyEventListener::prepareListenerObject(ExecutionContext* executionContext)
@@ -188,7 +188,7 @@ void V8LazyEventListener::prepareListenerObject(ExecutionContext* executionConte
if (toStringFunction.IsEmpty())
return;
String toStringString = "function " + m_functionName + "(" + m_eventParameterName + ") {\n " + m_code + "\n}";
- V8HiddenValue::setHiddenValue(isolate(), wrappedFunction, V8HiddenValue::toStringString(isolate()), v8String(isolate(), toStringString));
+ V8HiddenValue::setHiddenValue(scriptState, wrappedFunction, V8HiddenValue::toStringString(isolate()), v8String(isolate(), toStringString));
if (!v8CallBoolean(wrappedFunction->Set(scriptState->context(), v8AtomicString(isolate(), "toString"), toStringFunction)))
return;
wrappedFunction->SetName(v8String(isolate(), m_functionName));
@@ -203,7 +203,7 @@ void V8LazyEventListener::prepareListenerObject(ExecutionContext* executionConte
// m_code = String();
// m_eventParameterName = String();
// m_sourceURL = String();
- setListenerObject(wrappedFunction);
+ setListenerObject(wrappedFunction, scriptState);
}
void V8LazyEventListener::fireErrorEvent(v8::Local<v8::Context> v8Context, ExecutionContext* executionContext, v8::Local<v8::Message> message)

Powered by Google App Engine
This is Rietveld 408576698