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

Unified Diff: third_party/WebKit/Source/bindings/core/v8/DOMWrapperWorld.cpp

Issue 1981013002: Make sure ScriptWrappables have a wrapper before calling setReference() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/bindings/core/v8/DOMWrapperWorld.cpp
diff --git a/third_party/WebKit/Source/bindings/core/v8/DOMWrapperWorld.cpp b/third_party/WebKit/Source/bindings/core/v8/DOMWrapperWorld.cpp
index caf91073a0b13905e80c6cbb87fafe0eb6b9480c..293a277cadf5419117b0a55a07074e6e6ff7a164 100644
--- a/third_party/WebKit/Source/bindings/core/v8/DOMWrapperWorld.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/DOMWrapperWorld.cpp
@@ -160,7 +160,8 @@ void DOMWrapperWorld::markWrappersInAllWorlds(ScriptWrappable* scriptWrappable,
void DOMWrapperWorld::setWrapperReferencesInAllWorlds(const v8::Persistent<v8::Object>& parent, ScriptWrappable* scriptWrappable, v8::Isolate* isolate)
{
// Marking for the main world
- scriptWrappable->setReference(parent, isolate);
+ if (scriptWrappable->containsWrapper())
+ scriptWrappable->setReference(parent, isolate);
if (!isMainThread())
return;
WorldMap& isolatedWorlds = isolatedWorldMap();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698