| 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 12 matching lines...) Expand all Loading... |
| 23 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | 23 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
| 24 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | 24 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
| 25 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | 25 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
| 26 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 26 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
| 27 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 27 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 28 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 28 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 29 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 29 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 30 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 30 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 31 */ | 31 */ |
| 32 | 32 |
| 33 #include "config.h" | 33 #include "sky/engine/config.h" |
| 34 #include "bindings/core/v8/ScriptController.h" | 34 #include "sky/engine/bindings/core/v8/ScriptController.h" |
| 35 | 35 |
| 36 #include "bindings/core/v8/BindingSecurity.h" | |
| 37 #include "bindings/core/v8/ScriptCallStackFactory.h" | |
| 38 #include "bindings/core/v8/ScriptSourceCode.h" | |
| 39 #include "bindings/core/v8/ScriptValue.h" | |
| 40 #include "bindings/core/v8/V8Binding.h" | |
| 41 #include "bindings/core/v8/V8Event.h" | 36 #include "bindings/core/v8/V8Event.h" |
| 42 #include "bindings/core/v8/V8GCController.h" | |
| 43 #include "bindings/core/v8/V8HTMLElement.h" | 37 #include "bindings/core/v8/V8HTMLElement.h" |
| 44 #include "bindings/core/v8/V8PerContextData.h" | |
| 45 #include "bindings/core/v8/V8ScriptRunner.h" | |
| 46 #include "bindings/core/v8/V8Window.h" | 38 #include "bindings/core/v8/V8Window.h" |
| 47 #include "bindings/core/v8/WindowProxy.h" | 39 #include "sky/engine/bindings/core/v8/BindingSecurity.h" |
| 48 #include "core/app/Module.h" | 40 #include "sky/engine/bindings/core/v8/ScriptCallStackFactory.h" |
| 49 #include "core/dom/Document.h" | 41 #include "sky/engine/bindings/core/v8/ScriptSourceCode.h" |
| 50 #include "core/dom/Node.h" | 42 #include "sky/engine/bindings/core/v8/ScriptValue.h" |
| 51 #include "core/events/Event.h" | 43 #include "sky/engine/bindings/core/v8/V8Binding.h" |
| 52 #include "core/events/EventListener.h" | 44 #include "sky/engine/bindings/core/v8/V8GCController.h" |
| 53 #include "core/frame/LocalDOMWindow.h" | 45 #include "sky/engine/bindings/core/v8/V8PerContextData.h" |
| 54 #include "core/frame/LocalFrame.h" | 46 #include "sky/engine/bindings/core/v8/V8ScriptRunner.h" |
| 55 #include "core/frame/Settings.h" | 47 #include "sky/engine/bindings/core/v8/WindowProxy.h" |
| 56 #include "core/frame/UseCounter.h" | 48 #include "sky/engine/core/app/Module.h" |
| 57 #include "core/html/imports/HTMLImportChild.h" | 49 #include "sky/engine/core/dom/Document.h" |
| 58 #include "core/html/imports/HTMLImportLoader.h" | 50 #include "sky/engine/core/dom/Node.h" |
| 59 #include "core/html/parser/HTMLDocumentParser.h" | 51 #include "sky/engine/core/events/Event.h" |
| 60 #include "core/inspector/InspectorTraceEvents.h" | 52 #include "sky/engine/core/events/EventListener.h" |
| 61 #include "core/inspector/ScriptCallStack.h" | 53 #include "sky/engine/core/frame/LocalDOMWindow.h" |
| 62 #include "core/loader/FrameLoaderClient.h" | 54 #include "sky/engine/core/frame/LocalFrame.h" |
| 63 #include "platform/NotImplemented.h" | 55 #include "sky/engine/core/frame/Settings.h" |
| 64 #include "platform/TraceEvent.h" | 56 #include "sky/engine/core/frame/UseCounter.h" |
| 65 #include "platform/UserGestureIndicator.h" | 57 #include "sky/engine/core/html/imports/HTMLImportChild.h" |
| 66 #include "platform/Widget.h" | 58 #include "sky/engine/core/html/imports/HTMLImportLoader.h" |
| 67 #include "public/platform/Platform.h" | 59 #include "sky/engine/core/html/parser/HTMLDocumentParser.h" |
| 68 #include "wtf/CurrentTime.h" | 60 #include "sky/engine/core/inspector/InspectorTraceEvents.h" |
| 69 #include "wtf/StdLibExtras.h" | 61 #include "sky/engine/core/inspector/ScriptCallStack.h" |
| 70 #include "wtf/StringExtras.h" | 62 #include "sky/engine/core/loader/FrameLoaderClient.h" |
| 71 #include "wtf/text/CString.h" | 63 #include "sky/engine/platform/NotImplemented.h" |
| 72 #include "wtf/text/StringBuilder.h" | 64 #include "sky/engine/platform/TraceEvent.h" |
| 73 #include "wtf/text/TextPosition.h" | 65 #include "sky/engine/platform/UserGestureIndicator.h" |
| 66 #include "sky/engine/platform/Widget.h" |
| 67 #include "sky/engine/public/platform/Platform.h" |
| 68 #include "sky/engine/wtf/CurrentTime.h" |
| 69 #include "sky/engine/wtf/StdLibExtras.h" |
| 70 #include "sky/engine/wtf/StringExtras.h" |
| 71 #include "sky/engine/wtf/text/CString.h" |
| 72 #include "sky/engine/wtf/text/StringBuilder.h" |
| 73 #include "sky/engine/wtf/text/TextPosition.h" |
| 74 | 74 |
| 75 namespace blink { | 75 namespace blink { |
| 76 | 76 |
| 77 bool ScriptController::canAccessFromCurrentOrigin(LocalFrame *frame) | 77 bool ScriptController::canAccessFromCurrentOrigin(LocalFrame *frame) |
| 78 { | 78 { |
| 79 if (!frame) | 79 if (!frame) |
| 80 return false; | 80 return false; |
| 81 v8::Isolate* isolate = toIsolate(frame); | 81 v8::Isolate* isolate = toIsolate(frame); |
| 82 return !isolate->InContext() || BindingSecurity::shouldAllowAccessToFrame(is
olate, frame); | 82 return !isolate->InContext() || BindingSecurity::shouldAllowAccessToFrame(is
olate, frame); |
| 83 } | 83 } |
| (...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 357 scriptModule.resolvedDependencies.append(actual); | 357 scriptModule.resolvedDependencies.append(actual); |
| 358 } | 358 } |
| 359 } | 359 } |
| 360 } | 360 } |
| 361 } | 361 } |
| 362 | 362 |
| 363 V8ScriptRunner::runModule(m_isolate, m_frame->document(), scriptModule); | 363 V8ScriptRunner::runModule(m_isolate, m_frame->document(), scriptModule); |
| 364 } | 364 } |
| 365 | 365 |
| 366 } // namespace blink | 366 } // namespace blink |
| OLD | NEW |