| Index: third_party/WebKit/Source/bindings/modules/v8/V8ServiceWorkerMessageEventInternal.h
|
| diff --git a/third_party/WebKit/Source/bindings/modules/v8/V8ServiceWorkerMessageEventInternal.h b/third_party/WebKit/Source/bindings/modules/v8/V8ServiceWorkerMessageEventInternal.h
|
| index 361572365378381cfc0f33104d8947cb7ae9a300..367a7b242f2533327eada48ed414298d8f6f8d41 100644
|
| --- a/third_party/WebKit/Source/bindings/modules/v8/V8ServiceWorkerMessageEventInternal.h
|
| +++ b/third_party/WebKit/Source/bindings/modules/v8/V8ServiceWorkerMessageEventInternal.h
|
| @@ -57,14 +57,18 @@ void V8ServiceWorkerMessageEventInternal::constructorCustom(
|
|
|
| // TODO(bashi): Workaround for http://crbug.com/529941. We need to store
|
| // |data| as a private value to avoid cyclic references.
|
| - if (eventInitDict.hasData()) {
|
| - v8::Local<v8::Value> v8Data = eventInitDict.data().v8Value();
|
| - V8PrivateProperty::getMessageEventCachedData(info.GetIsolate())
|
| - .set(info.GetIsolate()->GetCurrentContext(), wrapper, v8Data);
|
| - if (DOMWrapperWorld::current(info.GetIsolate()).isIsolatedWorld())
|
| - impl->setSerializedData(
|
| - SerializedScriptValue::serializeAndSwallowExceptions(
|
| - info.GetIsolate(), v8Data));
|
| + /* DO NOT SUBMIT - merge conflict marker.
|
| + * Please spell |hasData| (not |HasData|) below. */
|
| + if (event_init_dict.hasData()) {
|
| + /* DO NOT SUBMIT - merge conflict marker.
|
| + * Please spell |data| (not |Data|) below. */
|
| + v8::Local<v8::Value> v8_data = event_init_dict.data().V8Value();
|
| + V8PrivateProperty::GetMessageEventCachedData(info.GetIsolate())
|
| + .Set(info.GetIsolate()->GetCurrentContext(), wrapper, v8_data);
|
| + if (DOMWrapperWorld::Current(info.GetIsolate()).IsIsolatedWorld())
|
| + impl->SetSerializedData(
|
| + SerializedScriptValue::SerializeAndSwallowExceptions(
|
| + info.GetIsolate(), v8_data));
|
| }
|
| v8SetReturnValue(info, wrapper);
|
| }
|
| @@ -85,13 +89,15 @@ void V8ServiceWorkerMessageEventInternal::dataAttributeGetterCustom(
|
| }
|
|
|
| v8::Local<v8::Value> data;
|
| - if (SerializedScriptValue* serializedValue = event->serializedData()) {
|
| + if (SerializedScriptValue* serialized_value = event->SerializedData()) {
|
| + /* DO NOT SUBMIT - merge conflict marker.
|
| + * Please spell |ports| (not |Ports|) in the 2 places below. */
|
| MessagePortArray ports = event->ports();
|
| - data = serializedValue->deserialize(isolate, &ports);
|
| - } else if (DOMWrapperWorld::current(isolate).isIsolatedWorld()) {
|
| - v8::Local<v8::Value> mainWorldData =
|
| - privateCachedData.getFromMainWorld(scriptState, event);
|
| - if (!mainWorldData.IsEmpty()) {
|
| + data = serialized_value->Deserialize(isolate, &ports);
|
| + } else if (DOMWrapperWorld::Current(isolate).IsIsolatedWorld()) {
|
| + v8::Local<v8::Value> main_world_data =
|
| + private_cached_data.GetFromMainWorld(script_state, event);
|
| + if (!main_world_data.IsEmpty()) {
|
| // TODO(bashi): Enter the main world's ScriptState::Scope while
|
| // serializing the main world's value.
|
| event->setSerializedData(
|
|
|