| 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 10 matching lines...) Expand all Loading... |
| 21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | 21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
| 22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | 22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
| 23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | 23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
| 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
| 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 29 */ | 29 */ |
| 30 | 30 |
| 31 #include "config.h" | 31 #include "sky/engine/config.h" |
| 32 #include "bindings/core/v8/V8Window.h" | 32 #include "bindings/core/v8/V8Window.h" |
| 33 | 33 |
| 34 #include "bindings/core/v8/BindingSecurity.h" | |
| 35 #include "bindings/core/v8/ExceptionMessages.h" | |
| 36 #include "bindings/core/v8/ExceptionState.h" | |
| 37 #include "bindings/core/v8/ScheduledAction.h" | |
| 38 #include "bindings/core/v8/ScriptController.h" | |
| 39 #include "bindings/core/v8/ScriptSourceCode.h" | |
| 40 #include "bindings/core/v8/SerializedScriptValue.h" | |
| 41 #include "bindings/core/v8/V8Binding.h" | |
| 42 #include "bindings/core/v8/V8EventListener.h" | |
| 43 #include "bindings/core/v8/V8EventListenerList.h" | |
| 44 #include "bindings/core/v8/V8GCForContextDispose.h" | |
| 45 #include "bindings/core/v8/V8HiddenValue.h" | |
| 46 #include "bindings/core/v8/V8Node.h" | 34 #include "bindings/core/v8/V8Node.h" |
| 47 #include "core/dom/ExceptionCode.h" | 35 #include "sky/engine/bindings/core/v8/BindingSecurity.h" |
| 48 #include "core/dom/Element.h" | 36 #include "sky/engine/bindings/core/v8/ExceptionMessages.h" |
| 49 #include "core/dom/Node.h" | 37 #include "sky/engine/bindings/core/v8/ExceptionState.h" |
| 50 #include "core/frame/DOMTimer.h" | 38 #include "sky/engine/bindings/core/v8/ScheduledAction.h" |
| 51 #include "core/frame/DOMWindowTimers.h" | 39 #include "sky/engine/bindings/core/v8/ScriptController.h" |
| 52 #include "core/frame/FrameView.h" | 40 #include "sky/engine/bindings/core/v8/ScriptSourceCode.h" |
| 53 #include "core/frame/LocalDOMWindow.h" | 41 #include "sky/engine/bindings/core/v8/SerializedScriptValue.h" |
| 54 #include "core/frame/LocalFrame.h" | 42 #include "sky/engine/bindings/core/v8/V8Binding.h" |
| 55 #include "core/frame/Settings.h" | 43 #include "sky/engine/bindings/core/v8/V8EventListener.h" |
| 56 #include "core/html/HTMLDocument.h" | 44 #include "sky/engine/bindings/core/v8/V8EventListenerList.h" |
| 57 #include "core/inspector/ScriptCallStack.h" | 45 #include "sky/engine/bindings/core/v8/V8GCForContextDispose.h" |
| 58 #include "platform/PlatformScreen.h" | 46 #include "sky/engine/bindings/core/v8/V8HiddenValue.h" |
| 59 #include "wtf/ArrayBuffer.h" | 47 #include "sky/engine/core/dom/Element.h" |
| 60 #include "wtf/Assertions.h" | 48 #include "sky/engine/core/dom/ExceptionCode.h" |
| 61 #include "wtf/OwnPtr.h" | 49 #include "sky/engine/core/dom/Node.h" |
| 50 #include "sky/engine/core/frame/DOMTimer.h" |
| 51 #include "sky/engine/core/frame/DOMWindowTimers.h" |
| 52 #include "sky/engine/core/frame/FrameView.h" |
| 53 #include "sky/engine/core/frame/LocalDOMWindow.h" |
| 54 #include "sky/engine/core/frame/LocalFrame.h" |
| 55 #include "sky/engine/core/frame/Settings.h" |
| 56 #include "sky/engine/core/html/HTMLDocument.h" |
| 57 #include "sky/engine/core/inspector/ScriptCallStack.h" |
| 58 #include "sky/engine/platform/PlatformScreen.h" |
| 59 #include "sky/engine/wtf/ArrayBuffer.h" |
| 60 #include "sky/engine/wtf/Assertions.h" |
| 61 #include "sky/engine/wtf/OwnPtr.h" |
| 62 | 62 |
| 63 namespace blink { | 63 namespace blink { |
| 64 | 64 |
| 65 // FIXME: There is a lot of duplication with SetTimeoutOrInterval() in V8WorkerG
lobalScopeCustom.cpp. | 65 // FIXME: There is a lot of duplication with SetTimeoutOrInterval() in V8WorkerG
lobalScopeCustom.cpp. |
| 66 // We should refactor this. | 66 // We should refactor this. |
| 67 static void windowSetTimeoutImpl(const v8::FunctionCallbackInfo<v8::Value>& info
, bool singleShot, ExceptionState& exceptionState) | 67 static void windowSetTimeoutImpl(const v8::FunctionCallbackInfo<v8::Value>& info
, bool singleShot, ExceptionState& exceptionState) |
| 68 { | 68 { |
| 69 int argumentCount = info.Length(); | 69 int argumentCount = info.Length(); |
| 70 | 70 |
| 71 if (argumentCount < 1) | 71 if (argumentCount < 1) |
| (...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 261 v8::Handle<v8::Context> context = toV8Context(frame, DOMWrapperWorld::curren
t(isolate)); | 261 v8::Handle<v8::Context> context = toV8Context(frame, DOMWrapperWorld::curren
t(isolate)); |
| 262 if (context.IsEmpty()) | 262 if (context.IsEmpty()) |
| 263 return v8Undefined(); | 263 return v8Undefined(); |
| 264 | 264 |
| 265 v8::Handle<v8::Object> global = context->Global(); | 265 v8::Handle<v8::Object> global = context->Global(); |
| 266 ASSERT(!global.IsEmpty()); | 266 ASSERT(!global.IsEmpty()); |
| 267 return global; | 267 return global; |
| 268 } | 268 } |
| 269 | 269 |
| 270 } // namespace blink | 270 } // namespace blink |
| OLD | NEW |