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

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

Issue 2849373002: Stop storing ScriptValue in MessageEvent (Closed)
Patch Set: Created 3 years, 8 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: third_party/WebKit/Source/bindings/core/v8/custom/V8MessageEventCustom.cpp
diff --git a/third_party/WebKit/Source/bindings/core/v8/custom/V8MessageEventCustom.cpp b/third_party/WebKit/Source/bindings/core/v8/custom/V8MessageEventCustom.cpp
index e56c2f03d6b7bd59788a2be792167943108c221d..4069e6ec822c9fe2205e056ed0e6c4d2daf38374 100644
--- a/third_party/WebKit/Source/bindings/core/v8/custom/V8MessageEventCustom.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/custom/V8MessageEventCustom.cpp
@@ -57,12 +57,12 @@ void V8MessageEvent::dataAttributeGetterCustom(
}
MessageEvent* event = V8MessageEvent::toImpl(info.Holder());
+ ScriptState* script_state = ScriptState::Current(isolate);
v8::Local<v8::Value> result;
switch (event->GetDataType()) {
- case MessageEvent::kDataTypeScriptValue:
- result =
- event->DataAsScriptValue().V8ValueFor(ScriptState::Current(isolate));
+ case MessageEvent::kDataTypeV8Reference:
+ result = event->DataAsScriptValue(script_state).V8ValueFor(script_state);
if (result.IsEmpty())
result = v8::Null(isolate);
break;

Powered by Google App Engine
This is Rietveld 408576698