Chromium Code Reviews| Index: Source/bindings/v8/V8Binding.cpp |
| diff --git a/Source/bindings/v8/V8Binding.cpp b/Source/bindings/v8/V8Binding.cpp |
| index 9bd2b00b53eb63f053611e22034683d387649fd4..1d807a497efac5950dfdd2e665039ca84428d754 100644 |
| --- a/Source/bindings/v8/V8Binding.cpp |
| +++ b/Source/bindings/v8/V8Binding.cpp |
| @@ -433,4 +433,17 @@ WrapperWorldType worldTypeInMainThread(v8::Isolate* isolate) |
| return MainWorld; |
| } |
| +DOMWrapperWorld* worldForIsolate(v8::Isolate* isolate) |
|
marja
2013/06/13 13:56:29
The name is slightly confusing, since this only re
adamk
2013/06/13 18:55:07
Renamed to isolatedWorldForIsolate(). Also changed
|
| +{ |
| + V8PerIsolateData* data = V8PerIsolateData::from(isolate); |
| + if (data->workerDOMDataStore()) |
| + return 0; |
| + if (!DOMWrapperWorld::isolatedWorldsExist()) |
| + return 0; |
| + ASSERT(!v8::Context::GetEntered().IsEmpty()); |
| + if (DOMWrapperWorld* isolatedWorld = DOMWrapperWorld::isolatedWorld(v8::Context::GetEntered())) |
|
marja
2013/06/13 13:56:29
Shorter (instead of these 3 lines):
return DOMWra
adamk
2013/06/13 18:55:07
Fixed, this was an artifact of a previous version
|
| + return isolatedWorld; |
| + return 0; |
| +} |
| + |
| } // namespace WebCore |