OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009, 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2009, 2011 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 ScriptState::~ScriptState() | 55 ScriptState::~ScriptState() |
56 { | 56 { |
57 } | 57 } |
58 | 58 |
59 DOMWindow* ScriptState::domWindow() const | 59 DOMWindow* ScriptState::domWindow() const |
60 { | 60 { |
61 v8::HandleScope handleScope; | 61 v8::HandleScope handleScope; |
62 return toDOMWindow(m_context.get()); | 62 return toDOMWindow(m_context.get()); |
63 } | 63 } |
64 | 64 |
| 65 DOMWrapperWorld* ScriptState::domWrapperWorld() const |
| 66 { |
| 67 v8::HandleScope handleScope; |
| 68 return DOMWrapperWorld::isolatedWorld(m_context.get()); |
| 69 } |
| 70 |
65 ScriptExecutionContext* ScriptState::scriptExecutionContext() const | 71 ScriptExecutionContext* ScriptState::scriptExecutionContext() const |
66 { | 72 { |
67 v8::HandleScope handleScope; | 73 v8::HandleScope handleScope; |
68 return toScriptExecutionContext(m_context.get()); | 74 return toScriptExecutionContext(m_context.get()); |
69 } | 75 } |
70 | 76 |
71 ScriptState* ScriptState::forContext(v8::Local<v8::Context> context) | 77 ScriptState* ScriptState::forContext(v8::Local<v8::Context> context) |
72 { | 78 { |
73 v8::Context::Scope contextScope(context); | 79 v8::Context::Scope contextScope(context); |
74 | 80 |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 { | 148 { |
143 WorkerScriptController* script = workerContext->script(); | 149 WorkerScriptController* script = workerContext->script(); |
144 if (!script) | 150 if (!script) |
145 return 0; | 151 return 0; |
146 | 152 |
147 v8::HandleScope handleScope; | 153 v8::HandleScope handleScope; |
148 return ScriptState::forContext(script->context()); | 154 return ScriptState::forContext(script->context()); |
149 } | 155 } |
150 | 156 |
151 } | 157 } |
OLD | NEW |