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

Unified Diff: third_party/WebKit/Source/bindings/core/v8/custom/V8ErrorEventCustom.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/core/v8/custom/V8ErrorEventCustom.cpp
diff --git a/third_party/WebKit/Source/bindings/core/v8/custom/V8ErrorEventCustom.cpp b/third_party/WebKit/Source/bindings/core/v8/custom/V8ErrorEventCustom.cpp
index 140d36c2d5242330e9a4ea3932664829924bd679..da0025e3385c251e62d6d453da0ae2a16077f981 100644
--- a/third_party/WebKit/Source/bindings/core/v8/custom/V8ErrorEventCustom.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/custom/V8ErrorEventCustom.cpp
@@ -38,23 +38,21 @@ namespace blink {
void V8ErrorEvent::errorAttributeGetterCustom(
const v8::FunctionCallbackInfo<v8::Value>& info) {
v8::Isolate* isolate = info.GetIsolate();
- v8::Local<v8::Context> context = isolate->GetCurrentContext();
auto privateError = V8PrivateProperty::getErrorEventError(isolate);
- v8::Local<v8::Value> cachedError =
- privateError.getOrUndefined(context, info.Holder());
+ v8::Local<v8::Value> cachedError = privateError.getOrUndefined(info.Holder());
if (!cachedError->IsUndefined()) {
v8SetReturnValue(info, cachedError);
return;
}
ErrorEvent* event = V8ErrorEvent::toImpl(info.Holder());
- ScriptState* scriptState = ScriptState::from(context);
+ ScriptState* scriptState = ScriptState::from(isolate->GetCurrentContext());
ScriptValue error = event->error(scriptState);
v8::Local<v8::Value> errorValue =
error.isEmpty() ? v8::Local<v8::Value>(v8::Null(isolate))
: error.v8Value();
- privateError.set(context, info.Holder(), errorValue);
+ privateError.set(info.Holder(), errorValue);
v8SetReturnValue(info, errorValue);
}

Powered by Google App Engine
This is Rietveld 408576698