| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 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 | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | 21 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
| 22 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF | 22 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF |
| 23 * THE POSSIBILITY OF SUCH DAMAGE. | 23 * THE POSSIBILITY OF SUCH DAMAGE. |
| 24 */ | 24 */ |
| 25 | 25 |
| 26 #include "sky/engine/config.h" | 26 #include "sky/engine/config.h" |
| 27 #include "sky/engine/bindings/core/v8/V8Initializer.h" | 27 #include "sky/engine/bindings/core/v8/V8Initializer.h" |
| 28 | 28 |
| 29 #include "bindings/core/v8/V8DOMException.h" | 29 #include "bindings/core/v8/V8DOMException.h" |
| 30 #include "bindings/core/v8/V8ErrorEvent.h" | 30 #include "bindings/core/v8/V8ErrorEvent.h" |
| 31 #include "bindings/core/v8/V8History.h" | |
| 32 #include "bindings/core/v8/V8Location.h" | 31 #include "bindings/core/v8/V8Location.h" |
| 33 #include "bindings/core/v8/V8Window.h" | 32 #include "bindings/core/v8/V8Window.h" |
| 34 #include "sky/engine/bindings/core/v8/DOMWrapperWorld.h" | 33 #include "sky/engine/bindings/core/v8/DOMWrapperWorld.h" |
| 35 #include "sky/engine/bindings/core/v8/ScriptCallStackFactory.h" | 34 #include "sky/engine/bindings/core/v8/ScriptCallStackFactory.h" |
| 36 #include "sky/engine/bindings/core/v8/ScriptController.h" | 35 #include "sky/engine/bindings/core/v8/ScriptController.h" |
| 37 #include "sky/engine/bindings/core/v8/ScriptProfiler.h" | 36 #include "sky/engine/bindings/core/v8/ScriptProfiler.h" |
| 38 #include "sky/engine/bindings/core/v8/V8Binding.h" | 37 #include "sky/engine/bindings/core/v8/V8Binding.h" |
| 39 #include "sky/engine/bindings/core/v8/V8ErrorHandler.h" | 38 #include "sky/engine/bindings/core/v8/V8ErrorHandler.h" |
| 40 #include "sky/engine/bindings/core/v8/V8GCController.h" | 39 #include "sky/engine/bindings/core/v8/V8GCController.h" |
| 41 #include "sky/engine/bindings/core/v8/V8PerContextData.h" | 40 #include "sky/engine/bindings/core/v8/V8PerContextData.h" |
| (...skipping 16 matching lines...) Expand all Loading... |
| 58 { | 57 { |
| 59 const WrapperTypeInfo* type = WrapperTypeInfo::unwrap(data); | 58 const WrapperTypeInfo* type = WrapperTypeInfo::unwrap(data); |
| 60 | 59 |
| 61 if (V8Window::wrapperTypeInfo.equals(type)) { | 60 if (V8Window::wrapperTypeInfo.equals(type)) { |
| 62 v8::Handle<v8::Object> windowWrapper = V8Window::findInstanceInPrototype
Chain(host, isolate); | 61 v8::Handle<v8::Object> windowWrapper = V8Window::findInstanceInPrototype
Chain(host, isolate); |
| 63 if (windowWrapper.IsEmpty()) | 62 if (windowWrapper.IsEmpty()) |
| 64 return 0; | 63 return 0; |
| 65 return V8Window::toNative(windowWrapper)->frame(); | 64 return V8Window::toNative(windowWrapper)->frame(); |
| 66 } | 65 } |
| 67 | 66 |
| 68 if (V8History::wrapperTypeInfo.equals(type)) | |
| 69 return V8History::toNative(host)->frame(); | |
| 70 | |
| 71 if (V8Location::wrapperTypeInfo.equals(type)) | 67 if (V8Location::wrapperTypeInfo.equals(type)) |
| 72 return V8Location::toNative(host)->frame(); | 68 return V8Location::toNative(host)->frame(); |
| 73 | 69 |
| 74 // This function can handle only those types listed above. | 70 // This function can handle only those types listed above. |
| 75 ASSERT_NOT_REACHED(); | 71 ASSERT_NOT_REACHED(); |
| 76 return 0; | 72 return 0; |
| 77 } | 73 } |
| 78 | 74 |
| 79 static void reportFatalErrorInMainThread(const char* location, const char* messa
ge) | 75 static void reportFatalErrorInMainThread(const char* location, const char* messa
ge) |
| 80 { | 76 { |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 217 v8::V8::SetFatalErrorHandler(reportFatalErrorInMainThread); | 213 v8::V8::SetFatalErrorHandler(reportFatalErrorInMainThread); |
| 218 v8::V8::AddMessageListener(messageHandlerInMainThread); | 214 v8::V8::AddMessageListener(messageHandlerInMainThread); |
| 219 v8::V8::SetFailedAccessCheckCallbackFunction(failedAccessCheckCallbackInMain
Thread); | 215 v8::V8::SetFailedAccessCheckCallbackFunction(failedAccessCheckCallbackInMain
Thread); |
| 220 | 216 |
| 221 isolate->SetEventLogger(timerTraceProfilerInMainThread); | 217 isolate->SetEventLogger(timerTraceProfilerInMainThread); |
| 222 | 218 |
| 223 ScriptProfiler::initialize(); | 219 ScriptProfiler::initialize(); |
| 224 } | 220 } |
| 225 | 221 |
| 226 } // namespace blink | 222 } // namespace blink |
| OLD | NEW |