OLD | NEW |
---|---|
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "bindings/core/v8/ToV8.h" | 5 #include "bindings/core/v8/ToV8.h" |
6 | 6 |
7 #include "core/events/EventTarget.h" | 7 #include "core/events/EventTarget.h" |
8 #include "core/frame/DOMWindow.h" | 8 #include "core/frame/DOMWindow.h" |
9 #include "core/workers/WorkerGlobalScope.h" | 9 #include "core/workers/WorkerGlobalScope.h" |
10 | 10 |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
43 } | 43 } |
44 | 44 |
45 v8::Local<v8::Value> toV8(WorkerGlobalScope* impl, v8::Local<v8::Object> creatio nContext, v8::Isolate* isolate) | 45 v8::Local<v8::Value> toV8(WorkerGlobalScope* impl, v8::Local<v8::Object> creatio nContext, v8::Isolate* isolate) |
46 { | 46 { |
47 // Notice that we explicitly ignore creationContext because the | 47 // Notice that we explicitly ignore creationContext because the |
48 // WorkerGlobalScope has its own creationContext. | 48 // WorkerGlobalScope has its own creationContext. |
49 | 49 |
50 if (UNLIKELY(!impl)) | 50 if (UNLIKELY(!impl)) |
51 return v8::Null(isolate); | 51 return v8::Null(isolate); |
52 | 52 |
53 WorkerScriptController* script = impl->script(); | 53 GlobalScopeScriptController* script = impl->script(); |
kinuko
2015/12/24 04:45:51
This toV8 method takes WorkerGlobalScope, should t
| |
54 if (!script) | 54 if (!script) |
55 return v8::Null(isolate); | 55 return v8::Null(isolate); |
56 | 56 |
57 v8::Local<v8::Object> global = script->context()->Global(); | 57 v8::Local<v8::Object> global = script->context()->Global(); |
58 ASSERT(!global.IsEmpty()); | 58 ASSERT(!global.IsEmpty()); |
59 return global; | 59 return global; |
60 } | 60 } |
61 | 61 |
62 } // namespace blink | 62 } // namespace blink |
OLD | NEW |