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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 #include "core/dom/ExceptionCode.h" | 43 #include "core/dom/ExceptionCode.h" |
44 #include "core/inspector/ScriptCallStack.h" | 44 #include "core/inspector/ScriptCallStack.h" |
45 #include "core/frame/ConsoleTypes.h" | 45 #include "core/frame/ConsoleTypes.h" |
46 #include "core/frame/ContentSecurityPolicy.h" | 46 #include "core/frame/ContentSecurityPolicy.h" |
47 #include "core/frame/DOMWindow.h" | 47 #include "core/frame/DOMWindow.h" |
48 #include "core/frame/Frame.h" | 48 #include "core/frame/Frame.h" |
49 #include "public/platform/Platform.h" | 49 #include "public/platform/Platform.h" |
50 #include "wtf/RefPtr.h" | 50 #include "wtf/RefPtr.h" |
51 #include "wtf/text/WTFString.h" | 51 #include "wtf/text/WTFString.h" |
52 #include <v8-debug.h> | 52 #include <v8-debug.h> |
| 53 #include <v8.h> |
53 | 54 |
54 namespace WebCore { | 55 namespace WebCore { |
55 | 56 |
56 static Frame* findFrame(v8::Local<v8::Object> host, v8::Local<v8::Value> data, v
8::Isolate* isolate) | 57 static Frame* findFrame(v8::Local<v8::Object> host, v8::Local<v8::Value> data, v
8::Isolate* isolate) |
57 { | 58 { |
58 const WrapperTypeInfo* type = WrapperTypeInfo::unwrap(data); | 59 const WrapperTypeInfo* type = WrapperTypeInfo::unwrap(data); |
59 | 60 |
60 if (V8Window::wrapperTypeInfo.equals(type)) { | 61 if (V8Window::wrapperTypeInfo.equals(type)) { |
61 v8::Handle<v8::Object> windowWrapper = host->FindInstanceInPrototypeChai
n(V8Window::domTemplate(isolate, worldTypeInMainThread(isolate))); | 62 v8::Handle<v8::Object> windowWrapper = host->FindInstanceInPrototypeChai
n(V8Window::domTemplate(isolate, worldTypeInMainThread(isolate))); |
62 if (windowWrapper.IsEmpty()) | 63 if (windowWrapper.IsEmpty()) |
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
222 v8::V8::AddMessageListener(messageHandlerInWorker); | 223 v8::V8::AddMessageListener(messageHandlerInWorker); |
223 v8::V8::SetFatalErrorHandler(reportFatalErrorInWorker); | 224 v8::V8::SetFatalErrorHandler(reportFatalErrorInWorker); |
224 | 225 |
225 v8::ResourceConstraints resourceConstraints; | 226 v8::ResourceConstraints resourceConstraints; |
226 uint32_t here; | 227 uint32_t here; |
227 resourceConstraints.set_stack_limit(&here - kWorkerMaxStackSize / sizeof(uin
t32_t*)); | 228 resourceConstraints.set_stack_limit(&here - kWorkerMaxStackSize / sizeof(uin
t32_t*)); |
228 v8::SetResourceConstraints(isolate, &resourceConstraints); | 229 v8::SetResourceConstraints(isolate, &resourceConstraints); |
229 } | 230 } |
230 | 231 |
231 } // namespace WebCore | 232 } // namespace WebCore |
OLD | NEW |