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

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

Issue 2675943003: Remove custom left overs from object grouping (Closed)
Patch Set: Rebase (0 changes) Created 3 years, 10 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/V8Binding.h" 9 #include "bindings/core/v8/V8Binding.h"
10 #include "bindings/core/v8/V8DOMWrapper.h" 10 #include "bindings/core/v8/V8DOMWrapper.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 43
44 ScriptState* scriptState = ScriptState::forReceiverObject(info); 44 ScriptState* scriptState = ScriptState::forReceiverObject(info);
45 v8::Local<v8::Function> v8Callback = v8::Local<v8::Function>::Cast(info[0]); 45 v8::Local<v8::Function> v8Callback = v8::Local<v8::Function>::Cast(info[0]);
46 IDBObserverCallback* callback = 46 IDBObserverCallback* callback =
47 IDBObserverCallback::create(scriptState, v8Callback); 47 IDBObserverCallback::create(scriptState, v8Callback);
48 IDBObserver* observer = IDBObserver::create(callback); 48 IDBObserver* observer = IDBObserver::create(callback);
49 if (exceptionState.hadException()) 49 if (exceptionState.hadException())
50 return; 50 return;
51 DCHECK(observer); 51 DCHECK(observer);
52 // TODO(bashi): Don't set private property (and remove this custom 52 // TODO(bashi): Don't set private property (and remove this custom
53 // constructor) when we can call setWrapperReference() correctly. 53 // constructor) when we can trace correctly.
54 V8PrivateProperty::getIDBObserverCallback(info.GetIsolate()) 54 V8PrivateProperty::getIDBObserverCallback(info.GetIsolate())
55 .set(info.GetIsolate()->GetCurrentContext(), wrapper, v8Callback); 55 .set(info.GetIsolate()->GetCurrentContext(), wrapper, v8Callback);
56 v8SetReturnValue(info, 56 v8SetReturnValue(info,
57 V8DOMWrapper::associateObjectWithWrapper( 57 V8DOMWrapper::associateObjectWithWrapper(
58 info.GetIsolate(), observer, &wrapperTypeInfo, wrapper)); 58 info.GetIsolate(), observer, &wrapperTypeInfo, wrapper));
59 } 59 }
60 60
61 } // namespace blink 61 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698