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

Unified Diff: sky/engine/bindings/templates/interface.cpp

Issue 776143003: Remove Isolated Worlds from Sky (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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
« no previous file with comments | « sky/engine/bindings/core/v8/custom/V8CustomEventCustom.cpp ('k') | sky/engine/core/loader/EmptyClients.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/bindings/templates/interface.cpp
diff --git a/sky/engine/bindings/templates/interface.cpp b/sky/engine/bindings/templates/interface.cpp
index bafe07c5709d3fe1bb9c68bd05975be309e076f1..288a3ad204491a43e5c90935019ca20ba0d2a9c1 100644
--- a/sky/engine/bindings/templates/interface.cpp
+++ b/sky/engine/bindings/templates/interface.cpp
@@ -603,24 +603,7 @@ static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info)
{% else %}
RefPtr<{{cpp_class}}> event = {{cpp_class}}::create(type, eventInit);
{% endif %}
- {% if any_type_attributes and not interface_name == 'ErrorEvent' %}
- {# If we're in an isolated world, create a SerializedScriptValue and store
- it in the event for later cloning if the property is accessed from
- another world. The main world case is handled lazily (in custom code).
-
- We do not clone Error objects (exceptions), for 2 reasons:
- 1) Errors carry a reference to the isolated world's global object, and
- thus passing it around would cause leakage.
- 2) Errors cannot be cloned (or serialized):
- http://www.whatwg.org/specs/web-apps/current-work/multipage/common-dom-interfaces.html#safe-passing-of-structured-data #}
- if (DOMWrapperWorld::current(info.GetIsolate()).isIsolatedWorld()) {
- {% for attribute in any_type_attributes %}
- if (!{{attribute.name}}.IsEmpty())
- event->setSerialized{{attribute.name | blink_capitalize}}(SerializedScriptValue::createAndSwallowExceptions({{attribute.name}}, info.GetIsolate()));
- {% endfor %}
- }
- {% endif %}
v8::Handle<v8::Object> wrapper = info.Holder();
V8DOMWrapper::associateObjectWithWrapper<{{v8_class}}>(event.release(), &{{v8_class}}::wrapperTypeInfo, wrapper, info.GetIsolate());
v8SetReturnValue(info, wrapper);
« no previous file with comments | « sky/engine/bindings/core/v8/custom/V8CustomEventCustom.cpp ('k') | sky/engine/core/loader/EmptyClients.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698