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

Side by Side Diff: third_party/WebKit/Source/bindings/modules/v8/custom/V8IDBObserverCustom.cpp

Issue 2856173004: Clean up bindings/core/v8 (Part 5) (Closed)
Patch Set: Fix build Created 3 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 unified diff | Download patch
OLDNEW
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/V8BindingForCore.h" 9 #include "bindings/core/v8/V8BindingForCore.h"
10 #include "bindings/core/v8/V8PrivateProperty.h"
11 #include "bindings/modules/v8/IDBObserverCallback.h" 10 #include "bindings/modules/v8/IDBObserverCallback.h"
12 #include "platform/bindings/V8DOMWrapper.h" 11 #include "platform/bindings/V8DOMWrapper.h"
12 #include "platform/bindings/V8PrivateProperty.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,
20 "IDBObserver"); 20 "IDBObserver");
21 21
22 if (UNLIKELY(info.Length() < 1)) { 22 if (UNLIKELY(info.Length() < 1)) {
(...skipping 28 matching lines...) Expand all
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698