Chromium Code Reviews| Index: Source/bindings/templates/interface_base.cpp |
| diff --git a/Source/bindings/templates/interface_base.cpp b/Source/bindings/templates/interface_base.cpp |
| index ea5c732e40872d01d3d2a217d839c10bde592e0b..a4b71ff0b91a00e31da53a75f9873f5045f37314 100644 |
| --- a/Source/bindings/templates/interface_base.cpp |
| +++ b/Source/bindings/templates/interface_base.cpp |
| @@ -418,6 +418,14 @@ static void install{{v8_class}}Template(v8::Local<v8::FunctionTemplate> function |
| {% endfilter %}{# per_context_enabled() #} |
| {% endif %} |
| {# End special operations #} |
| + {% if unscopeables %} |
| + v8::Local<v8::Context> context(isolate->GetCurrentContext()); |
| + v8::Local<v8::Object> unscopeables(v8::Object::New(isolate)); |
| + {% for name in unscopeables %} |
| + unscopeables->ForceSet(context, v8AtomicString(isolate, "{{name}}"), v8::True(isolate)); |
| + {% endfor %} |
| + prototypeTemplate->Set(v8::Symbol::GetUnscopables(isolate), unscopeables); |
|
haraken
2015/04/20 14:00:13
Should we check a return value of ForceSet and Set
|
| + {% endif %} |
| {% if has_custom_legacy_call_as_function %} |
| functionTemplate->InstanceTemplate()->SetCallAsFunctionHandler({{v8_class}}::legacyCallCustom); |
| {% endif %} |