| 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 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 | 155 |
| 156 LocalWindowProxy* ScriptController::windowProxy(DOMWrapperWorld& world) { | 156 LocalWindowProxy* ScriptController::windowProxy(DOMWrapperWorld& world) { |
| 157 LocalWindowProxy* windowProxy = m_windowProxyManager->windowProxy(world); | 157 LocalWindowProxy* windowProxy = m_windowProxyManager->windowProxy(world); |
| 158 windowProxy->initializeIfNeeded(); | 158 windowProxy->initializeIfNeeded(); |
| 159 return windowProxy; | 159 return windowProxy; |
| 160 } | 160 } |
| 161 | 161 |
| 162 bool ScriptController::shouldBypassMainWorldCSP() { | 162 bool ScriptController::shouldBypassMainWorldCSP() { |
| 163 v8::HandleScope handleScope(isolate()); | 163 v8::HandleScope handleScope(isolate()); |
| 164 v8::Local<v8::Context> context = isolate()->GetCurrentContext(); | 164 v8::Local<v8::Context> context = isolate()->GetCurrentContext(); |
| 165 if (context.IsEmpty() || !toDOMWindow(context)) | 165 if (context.IsEmpty() || !toLocalDOMWindow(context)) |
| 166 return false; | 166 return false; |
| 167 DOMWrapperWorld& world = DOMWrapperWorld::current(isolate()); | 167 DOMWrapperWorld& world = DOMWrapperWorld::current(isolate()); |
| 168 return world.isIsolatedWorld() ? world.isolatedWorldHasContentSecurityPolicy() | 168 return world.isIsolatedWorld() ? world.isolatedWorldHasContentSecurityPolicy() |
| 169 : false; | 169 : false; |
| 170 } | 170 } |
| 171 | 171 |
| 172 TextPosition ScriptController::eventHandlerPosition() const { | 172 TextPosition ScriptController::eventHandlerPosition() const { |
| 173 ScriptableDocumentParser* parser = | 173 ScriptableDocumentParser* parser = |
| 174 frame()->document()->scriptableDocumentParser(); | 174 frame()->document()->scriptableDocumentParser(); |
| 175 if (parser) | 175 if (parser) |
| (...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 375 for (size_t i = 0; i < resultArray->Length(); ++i) { | 375 for (size_t i = 0; i < resultArray->Length(); ++i) { |
| 376 v8::Local<v8::Value> value; | 376 v8::Local<v8::Value> value; |
| 377 if (!resultArray->Get(scriptState->context(), i).ToLocal(&value)) | 377 if (!resultArray->Get(scriptState->context(), i).ToLocal(&value)) |
| 378 return; | 378 return; |
| 379 results->push_back(value); | 379 results->push_back(value); |
| 380 } | 380 } |
| 381 } | 381 } |
| 382 } | 382 } |
| 383 | 383 |
| 384 } // namespace blink | 384 } // namespace blink |
| OLD | NEW |