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

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

Issue 353623003: Remove obsolete document wrapper creation in named constructors (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@idl-document-cleanup
Patch Set: Created 6 years, 6 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 | « no previous file | Source/bindings/tests/results/V8TestInterfaceEventTarget.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/templates/methods.cpp
diff --git a/Source/bindings/templates/methods.cpp b/Source/bindings/templates/methods.cpp
index 4a44e7228dc0ce23b2376546459023e7542a645f..7bb209af1074f3b4fa321c5e2b62b7ef9585b270 100644
--- a/Source/bindings/templates/methods.cpp
+++ b/Source/bindings/templates/methods.cpp
@@ -540,13 +540,7 @@ static void {{v8_class}}ConstructorCallback(const v8::FunctionCallbackInfo<v8::V
return;
}
- Document* documentPtr = currentDOMWindow(isolate)->document();
- ASSERT(documentPtr);
- Document& document = *documentPtr;
-
- // Make sure the document is added to the DOM Node map. Otherwise, the {{cpp_class}} instance
- // may end up being the only node in the map and get garbage-collected prematurely.
- toV8(documentPtr, info.Holder(), isolate);
+ Document& document = *toDocument(currentExecutionContext(isolate));
{% if constructor.has_exception_state %}
ExceptionState exceptionState(ExceptionState::ConstructionContext, "{{interface_name}}", info.Holder(), isolate);
« no previous file with comments | « no previous file | Source/bindings/tests/results/V8TestInterfaceEventTarget.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698