| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2008, 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2008, 2009 Google Inc. All rights reserved. |
| 3 * Copyright (C) 2009 Apple Inc. All rights reserved. | 3 * Copyright (C) 2009 Apple Inc. All rights reserved. |
| 4 * Copyright (C) 2014 Opera Software ASA. All rights reserved. | 4 * Copyright (C) 2014 Opera Software ASA. All rights reserved. |
| 5 * | 5 * |
| 6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
| 7 * modification, are permitted provided that the following conditions are | 7 * modification, are permitted provided that the following conditions are |
| 8 * met: | 8 * met: |
| 9 * | 9 * |
| 10 * * Redistributions of source code must retain the above copyright | 10 * * Redistributions of source code must retain the above copyright |
| (...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 352 if (results) { | 352 if (results) { |
| 353 for (size_t i = 0; i < result_array->Length(); ++i) { | 353 for (size_t i = 0; i < result_array->Length(); ++i) { |
| 354 v8::Local<v8::Value> value; | 354 v8::Local<v8::Value> value; |
| 355 if (!result_array->Get(context, i).ToLocal(&value)) | 355 if (!result_array->Get(context, i).ToLocal(&value)) |
| 356 return; | 356 return; |
| 357 results->push_back(value); | 357 results->push_back(value); |
| 358 } | 358 } |
| 359 } | 359 } |
| 360 } | 360 } |
| 361 | 361 |
| 362 int ScriptController::CreateNewDevToolsIsolatedWorld(const String& world_name) { |
| 363 int world_id = DOMWrapperWorld::GetNextDevToolsIsolatedWorldId(); |
| 364 // Bail out if we could not allocate an id. |
| 365 if (world_id == DOMWrapperWorld::kInvalidWorldId) |
| 366 return DOMWrapperWorld::kInvalidWorldId; |
| 367 |
| 368 RefPtr<DOMWrapperWorld> world = |
| 369 DOMWrapperWorld::EnsureIsolatedWorld(GetIsolate(), world_id); |
| 370 |
| 371 DOMWrapperWorld::SetIsolatedWorldHumanReadableName(world_id, world_name); |
| 372 // Make sure the execution context exists. |
| 373 WindowProxy(*world); |
| 374 return world_id; |
| 375 } |
| 376 |
| 362 } // namespace blink | 377 } // namespace blink |
| OLD | NEW |