| Index: third_party/WebKit/Source/bindings/core/v8/ScriptController.cpp
|
| diff --git a/third_party/WebKit/Source/bindings/core/v8/ScriptController.cpp b/third_party/WebKit/Source/bindings/core/v8/ScriptController.cpp
|
| index 7a2345af3bee52599e92125f0d85869c58be4c19..6e71d68b0f8e8ef762c73b292fb91d7af35968a7 100644
|
| --- a/third_party/WebKit/Source/bindings/core/v8/ScriptController.cpp
|
| +++ b/third_party/WebKit/Source/bindings/core/v8/ScriptController.cpp
|
| @@ -360,4 +360,21 @@ void ScriptController::ExecuteScriptInIsolatedWorld(
|
| }
|
| }
|
|
|
| +int ScriptController::CreateNewDevToolsIsolatedWorld(const String& world_name) {
|
| + int world_id = DOMWrapperWorld::GenerateWorldIdForType(
|
| + DOMWrapperWorld::WorldType::kIsolated);
|
| + // Bail out if we could not allocate an id.
|
| + if (world_id == DOMWrapperWorld::kInvalidWorldId)
|
| + return DOMWrapperWorld::kInvalidWorldId;
|
| +
|
| + RefPtr<DOMWrapperWorld> world =
|
| + DOMWrapperWorld::EnsureIsolatedWorld(GetIsolate(), world_id);
|
| +
|
| + if (!world_name.IsEmpty())
|
| + DOMWrapperWorld::SetIsolatedWorldHumanReadableName(world_id, world_name);
|
| + // Make sure the execution context exists.
|
| + WindowProxy(*world);
|
| + return world_id;
|
| +}
|
| +
|
| } // namespace blink
|
|
|