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

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

Issue 2785943002: [Bindings] Simplify V8PrivateProperty::Symbol methods (Closed)
Patch Set: work for comments Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/bindings/modules/v8/custom/V8IDBObserverCustom.cpp
diff --git a/third_party/WebKit/Source/bindings/modules/v8/custom/V8IDBObserverCustom.cpp b/third_party/WebKit/Source/bindings/modules/v8/custom/V8IDBObserverCustom.cpp
index 66ddf1032c2a0efc7bee5a51c8232faea2c78cf3..d9979dd98283a0843823e008feb7d163b79db540 100644
--- a/third_party/WebKit/Source/bindings/modules/v8/custom/V8IDBObserverCustom.cpp
+++ b/third_party/WebKit/Source/bindings/modules/v8/custom/V8IDBObserverCustom.cpp
@@ -15,8 +15,9 @@ namespace blink {
void V8IDBObserver::constructorCustom(
const v8::FunctionCallbackInfo<v8::Value>& info) {
- ExceptionState exceptionState(
- info.GetIsolate(), ExceptionState::ConstructionContext, "IDBObserver");
+ v8::Isolate* isolate = info.GetIsolate();
+ ExceptionState exceptionState(isolate, ExceptionState::ConstructionContext,
+ "IDBObserver");
if (UNLIKELY(info.Length() < 1)) {
exceptionState.throwTypeError(
@@ -51,11 +52,9 @@ void V8IDBObserver::constructorCustom(
DCHECK(observer);
// TODO(bashi): Don't set private property (and remove this custom
// constructor) when we can trace correctly.
- V8PrivateProperty::getIDBObserverCallback(info.GetIsolate())
- .set(info.GetIsolate()->GetCurrentContext(), wrapper, v8Callback);
- v8SetReturnValue(info,
- V8DOMWrapper::associateObjectWithWrapper(
- info.GetIsolate(), observer, &wrapperTypeInfo, wrapper));
+ V8PrivateProperty::getIDBObserverCallback(isolate).set(wrapper, v8Callback);
+ v8SetReturnValue(info, V8DOMWrapper::associateObjectWithWrapper(
+ isolate, observer, &wrapperTypeInfo, wrapper));
}
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698