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

Unified Diff: third_party/WebKit/Source/bindings/templates/methods.cpp.tmpl

Issue 2794453002: [Bindings] Replace V8HiddenValue in generated code with V8PrivateProperty (Closed)
Patch Set: . 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/templates/methods.cpp.tmpl
diff --git a/third_party/WebKit/Source/bindings/templates/methods.cpp.tmpl b/third_party/WebKit/Source/bindings/templates/methods.cpp.tmpl
index 88c099f63f39b47f318a4bdd583965cf3b558540..50476cbe9b8be4177b454701976b88aceaf4bafc 100644
--- a/third_party/WebKit/Source/bindings/templates/methods.cpp.tmpl
+++ b/third_party/WebKit/Source/bindings/templates/methods.cpp.tmpl
@@ -534,9 +534,11 @@ static void {{method.name}}OriginSafeMethodGetter{{world_suffix}}(const v8::Prop
return;
}
- v8::Local<v8::Value> hiddenValue = V8HiddenValue::getHiddenValue(ScriptState::current(info.GetIsolate()), v8::Local<v8::Object>::Cast(info.Holder()), v8AtomicString(info.GetIsolate(), "{{method.name}}"));
- if (!hiddenValue.IsEmpty()) {
- v8SetReturnValue(info, hiddenValue);
+ v8::Local<v8::Value> propertyValue =
+ V8PrivateProperty::createSymbol(info.GetIsolate(), "{{method.name}}")
Yuki 2017/03/31 13:38:29 Could you add a comment that {{method.name}} was c
peria 2017/04/03 04:58:44 Done.
+ .getOrUndefined(v8::Local<v8::Object>::Cast(info.Holder()));
Yuki 2017/03/31 13:38:30 nit: 4 space indent in addition to the level of V8
peria 2017/04/03 04:58:43 Done.
+ if (!propertyValue->IsUndefined()) {
Yuki 2017/03/31 13:38:29 The value can be |undefined|.
peria 2017/04/03 04:58:44 Done.
+ v8SetReturnValue(info, propertyValue);
}
}
{% endmacro %}

Powered by Google App Engine
This is Rietveld 408576698