| Index: Source/bindings/v8/DOMWrapperWorld.cpp
|
| diff --git a/Source/bindings/v8/DOMWrapperWorld.cpp b/Source/bindings/v8/DOMWrapperWorld.cpp
|
| index 59cb45057160775643fe75f51d4c11de065e7de5..eceb798c9dfa7c9e05c05558047214d09d14c83d 100644
|
| --- a/Source/bindings/v8/DOMWrapperWorld.cpp
|
| +++ b/Source/bindings/v8/DOMWrapperWorld.cpp
|
| @@ -67,6 +67,19 @@ DOMWrapperWorld& DOMWrapperWorld::mainWorld()
|
| return *cachedMainWorld;
|
| }
|
|
|
| +DOMWrapperWorld& DOMWrapperWorld::blinkInJSWorld()
|
| +{
|
| + ASSERT(isMainThread());
|
| + DEFINE_STATIC_LOCAL(RefPtr<DOMWrapperWorld>, cachedBlinkInJSWorld, ());
|
| + DEFINE_STATIC_LOCAL(bool, isInitialized, (false));
|
| + if (!isInitialized) {
|
| + isInitialized = true;
|
| + cachedBlinkInJSWorld = DOMWrapperWorld::create(BlinkInJSIsolatedWorldId, blinkInJSIsolatedWorldExtensionGroup);
|
| + isolatedWorldCount++;
|
| + }
|
| + return *cachedBlinkInJSWorld;
|
| +}
|
| +
|
| typedef HashMap<int, DOMWrapperWorld*> WorldMap;
|
| static WorldMap& isolatedWorldMap()
|
| {
|
|
|