| 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/V8IDBObserver.h" | 5 #include "bindings/modules/v8/V8IDBObserver.h" |
| 6 | 6 |
| 7 #include "bindings/core/v8/ExceptionMessages.h" | 7 #include "bindings/core/v8/ExceptionMessages.h" |
| 8 #include "bindings/core/v8/ExceptionState.h" | 8 #include "bindings/core/v8/ExceptionState.h" |
| 9 #include "bindings/core/v8/V8Binding.h" | 9 #include "bindings/core/v8/V8BindingForCore.h" |
| 10 #include "bindings/core/v8/V8DOMWrapper.h" | 10 #include "bindings/core/v8/V8DOMWrapper.h" |
| 11 #include "bindings/core/v8/V8PrivateProperty.h" | 11 #include "bindings/core/v8/V8PrivateProperty.h" |
| 12 #include "bindings/modules/v8/IDBObserverCallback.h" | 12 #include "bindings/modules/v8/IDBObserverCallback.h" |
| 13 | 13 |
| 14 namespace blink { | 14 namespace blink { |
| 15 | 15 |
| 16 void V8IDBObserver::constructorCustom( | 16 void V8IDBObserver::constructorCustom( |
| 17 const v8::FunctionCallbackInfo<v8::Value>& info) { | 17 const v8::FunctionCallbackInfo<v8::Value>& info) { |
| 18 v8::Isolate* isolate = info.GetIsolate(); | 18 v8::Isolate* isolate = info.GetIsolate(); |
| 19 ExceptionState exception_state(isolate, ExceptionState::kConstructionContext, | 19 ExceptionState exception_state(isolate, ExceptionState::kConstructionContext, |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 return; | 51 return; |
| 52 DCHECK(observer); | 52 DCHECK(observer); |
| 53 // TODO(bashi): Don't set private property (and remove this custom | 53 // TODO(bashi): Don't set private property (and remove this custom |
| 54 // constructor) when we can trace correctly. | 54 // constructor) when we can trace correctly. |
| 55 V8PrivateProperty::GetIDBObserverCallback(isolate).Set(wrapper, v8_callback); | 55 V8PrivateProperty::GetIDBObserverCallback(isolate).Set(wrapper, v8_callback); |
| 56 V8SetReturnValue(info, V8DOMWrapper::AssociateObjectWithWrapper( | 56 V8SetReturnValue(info, V8DOMWrapper::AssociateObjectWithWrapper( |
| 57 isolate, observer, &wrapperTypeInfo, wrapper)); | 57 isolate, observer, &wrapperTypeInfo, wrapper)); |
| 58 } | 58 } |
| 59 | 59 |
| 60 } // namespace blink | 60 } // namespace blink |
| OLD | NEW |