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

Unified Diff: Source/bindings/templates/interface.cpp

Issue 209713003: Make DOMWrapperWorld::current() return a reference instead of a pointer (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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
« no previous file with comments | « Source/bindings/templates/interface.h ('k') | Source/bindings/tests/results/V8SVGTestInterface.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/templates/interface.cpp
diff --git a/Source/bindings/templates/interface.cpp b/Source/bindings/templates/interface.cpp
index 918d276560edf441c6cff2fc70e41295b210e1a0..660c17534d711a760431dd67f891a4946bcffa8a 100644
--- a/Source/bindings/templates/interface.cpp
+++ b/Source/bindings/templates/interface.cpp
@@ -662,7 +662,7 @@ static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info)
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(isolate)->isIsolatedWorld()) {
+ if (DOMWrapperWorld::current(isolate).isIsolatedWorld()) {
{% for attribute in any_type_attributes %}
if (!{{attribute.name}}.IsEmpty())
event->setSerialized{{attribute.name | blink_capitalize}}(SerializedScriptValue::createAndSwallowExceptions({{attribute.name}}, isolate));
@@ -975,7 +975,7 @@ static void configure{{v8_class}}Template(v8::Handle<v8::FunctionTemplate> funct
{% filter conditional(method.conditional_string) %}
{% if method.is_do_not_check_security %}
{% if method.is_per_world_bindings %}
- if (DOMWrapperWorld::current(isolate)->isMainWorld()) {
+ if (DOMWrapperWorld::current(isolate).isMainWorld()) {
{{install_do_not_check_security_signature(method, 'ForMainWorld')}}
} else {
{{install_do_not_check_security_signature(method)}}
@@ -985,7 +985,7 @@ static void configure{{v8_class}}Template(v8::Handle<v8::FunctionTemplate> funct
{% endif %}
{% else %}{# is_do_not_check_security #}
{% if method.is_per_world_bindings %}
- if (DOMWrapperWorld::current(isolate)->isMainWorld()) {
+ if (DOMWrapperWorld::current(isolate).isMainWorld()) {
{% filter runtime_enabled(method.runtime_enabled_function) %}
{{install_custom_signature(method, 'ForMainWorld')}}
{% endfilter %}
@@ -1203,7 +1203,7 @@ EventTarget* {{v8_class}}::toEventTarget(v8::Handle<v8::Object> object)
{% if interface_name == 'Window' %}
v8::Handle<v8::ObjectTemplate> V8Window::getShadowObjectTemplate(v8::Isolate* isolate)
{
- if (DOMWrapperWorld::current(isolate)->isMainWorld()) {
+ if (DOMWrapperWorld::current(isolate).isMainWorld()) {
DEFINE_STATIC_LOCAL(v8::Persistent<v8::ObjectTemplate>, V8WindowShadowObjectCacheForMainWorld, ());
if (V8WindowShadowObjectCacheForMainWorld.IsEmpty()) {
TRACE_EVENT_SCOPED_SAMPLING_STATE("Blink", "BuildDOMTemplate");
@@ -1244,8 +1244,8 @@ v8::Handle<v8::Object> wrap({{cpp_class}}* impl, v8::Handle<v8::Object> creation
{% if is_document %}
if (wrapper.IsEmpty())
return wrapper;
- DOMWrapperWorld* world = DOMWrapperWorld::current(isolate);
- if (world->isMainWorld()) {
+ DOMWrapperWorld& world = DOMWrapperWorld::current(isolate);
+ if (world.isMainWorld()) {
if (LocalFrame* frame = impl->frame())
frame->script().windowShell(world)->updateDocumentWrapper(wrapper);
}
« no previous file with comments | « Source/bindings/templates/interface.h ('k') | Source/bindings/tests/results/V8SVGTestInterface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698