| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "bindings/modules/v8/V8ExtendableMessageEvent.h" | 5 #include "bindings/modules/v8/V8ExtendableMessageEvent.h" |
| 6 | 6 |
| 7 #include "bindings/core/v8/V8PrivateProperty.h" | |
| 8 #include "bindings/modules/v8/V8ExtendableMessageEventInit.h" | 7 #include "bindings/modules/v8/V8ExtendableMessageEventInit.h" |
| 8 #include "platform/bindings/V8PrivateProperty.h" |
| 9 | 9 |
| 10 namespace blink { | 10 namespace blink { |
| 11 | 11 |
| 12 void V8ExtendableMessageEvent::constructorCustom( | 12 void V8ExtendableMessageEvent::constructorCustom( |
| 13 const v8::FunctionCallbackInfo<v8::Value>& info) { | 13 const v8::FunctionCallbackInfo<v8::Value>& info) { |
| 14 v8::Isolate* isolate = info.GetIsolate(); | 14 v8::Isolate* isolate = info.GetIsolate(); |
| 15 ExceptionState exception_state(isolate, ExceptionState::kConstructionContext, | 15 ExceptionState exception_state(isolate, ExceptionState::kConstructionContext, |
| 16 "ExtendableMessageEvent"); | 16 "ExtendableMessageEvent"); |
| 17 if (UNLIKELY(info.Length() < 1)) { | 17 if (UNLIKELY(info.Length() < 1)) { |
| 18 exception_state.ThrowTypeError( | 18 exception_state.ThrowTypeError( |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 data = event->SerializedData()->Deserialize(isolate); | 88 data = event->SerializedData()->Deserialize(isolate); |
| 89 } | 89 } |
| 90 } | 90 } |
| 91 if (data.IsEmpty()) | 91 if (data.IsEmpty()) |
| 92 data = v8::Null(isolate); | 92 data = v8::Null(isolate); |
| 93 private_cached_data.Set(info.Holder(), data); | 93 private_cached_data.Set(info.Holder(), data); |
| 94 V8SetReturnValue(info, data); | 94 V8SetReturnValue(info, data); |
| 95 } | 95 } |
| 96 | 96 |
| 97 } // namespace blink | 97 } // namespace blink |
| OLD | NEW |