| 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 3faa6aaa03e53c7d6816a9717706c3241e9f7b87..caf91073a0b13905e80c6cbb87fafe0eb6b9480c 100644
|
| --- a/third_party/WebKit/Source/bindings/core/v8/DOMWrapperWorld.cpp
|
| +++ b/third_party/WebKit/Source/bindings/core/v8/DOMWrapperWorld.cpp
|
| @@ -148,8 +148,8 @@ void DOMWrapperWorld::markWrappersInAllWorlds(ScriptWrappable* scriptWrappable,
|
| if (!isMainThread())
|
| return;
|
| WorldMap& isolatedWorlds = isolatedWorldMap();
|
| - for (auto& keyValuePair : isolatedWorlds) {
|
| - DOMDataStore& dataStore = keyValuePair.value->domDataStore();
|
| + for (auto& world : isolatedWorlds.values()) {
|
| + DOMDataStore& dataStore = world->domDataStore();
|
| if (dataStore.containsWrapper(scriptWrappable)) {
|
| // Marking for the isolated worlds
|
| dataStore.markWrapper(scriptWrappable);
|
| @@ -157,6 +157,22 @@ 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 (!isMainThread())
|
| + return;
|
| + WorldMap& isolatedWorlds = isolatedWorldMap();
|
| + for (auto& world : isolatedWorlds.values()) {
|
| + DOMDataStore& dataStore = world->domDataStore();
|
| + if (dataStore.containsWrapper(scriptWrappable)) {
|
| + // Marking for the isolated worlds
|
| + dataStore.setReference(parent, scriptWrappable, isolate);
|
| + }
|
| + }
|
| +}
|
| +
|
| DOMWrapperWorld::~DOMWrapperWorld()
|
| {
|
| ASSERT(!isMainWorld());
|
|
|