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

Unified Diff: third_party/WebKit/Source/core/events/MessageEvent.cpp

Issue 2007463003: binding: Reimplements V8HiddenValue as V8PrivateProperty. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed review comments. Created 4 years, 7 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
« no previous file with comments | « third_party/WebKit/Source/bindings/modules/v8/V8ServiceWorkerMessageEventInternal.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/events/MessageEvent.cpp
diff --git a/third_party/WebKit/Source/core/events/MessageEvent.cpp b/third_party/WebKit/Source/core/events/MessageEvent.cpp
index bceaf11d6387f00c6f88ced2c19537dcc9fffb31..8a0aa5d59fb513331b45c73f9e25db7ed16dff84 100644
--- a/third_party/WebKit/Source/core/events/MessageEvent.cpp
+++ b/third_party/WebKit/Source/core/events/MessageEvent.cpp
@@ -30,6 +30,7 @@
#include "bindings/core/v8/ExceptionMessages.h"
#include "bindings/core/v8/ExceptionState.h"
#include "bindings/core/v8/V8ArrayBuffer.h"
+#include "bindings/core/v8/V8PrivateProperty.h"
namespace blink {
@@ -218,18 +219,18 @@ v8::Local<v8::Object> MessageEvent::associateWithWrapper(v8::Isolate* isolate, c
// Ensures a wrapper is created for the data to return now so that V8 knows how
// much memory is used via the wrapper. To keep the wrapper alive, it's set to
- // the wrapper of the MessageEvent as a hidden value.
+ // the wrapper of the MessageEvent as a private value.
switch (getDataType()) {
case MessageEvent::DataTypeScriptValue:
case MessageEvent::DataTypeSerializedScriptValue:
break;
case MessageEvent::DataTypeString:
- V8HiddenValue::setHiddenValue(ScriptState::current(isolate), wrapper, V8HiddenValue::stringData(isolate), v8String(isolate, dataAsString()));
+ V8PrivateProperty::getMessageEventCachedData(isolate).set(isolate->GetCurrentContext(), wrapper, v8String(isolate, dataAsString()));
break;
case MessageEvent::DataTypeBlob:
break;
case MessageEvent::DataTypeArrayBuffer:
- V8HiddenValue::setHiddenValue(ScriptState::current(isolate), wrapper, V8HiddenValue::arrayBufferData(isolate), toV8(dataAsArrayBuffer(), wrapper, isolate));
+ V8PrivateProperty::getMessageEventCachedData(isolate).set(isolate->GetCurrentContext(), wrapper, toV8(dataAsArrayBuffer(), wrapper, isolate));
break;
}
« no previous file with comments | « third_party/WebKit/Source/bindings/modules/v8/V8ServiceWorkerMessageEventInternal.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698