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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 #include "core/frame/LocalDOMWindow.h" | 45 #include "core/frame/LocalDOMWindow.h" |
46 #include "core/frame/LocalFrame.h" | 46 #include "core/frame/LocalFrame.h" |
47 #include "core/frame/csp/ContentSecurityPolicy.h" | 47 #include "core/frame/csp/ContentSecurityPolicy.h" |
48 #include "core/inspector/ScriptCallStack.h" | 48 #include "core/inspector/ScriptCallStack.h" |
49 #include "platform/TraceEvent.h" | 49 #include "platform/TraceEvent.h" |
50 #include "public/platform/Platform.h" | 50 #include "public/platform/Platform.h" |
51 #include "wtf/RefPtr.h" | 51 #include "wtf/RefPtr.h" |
52 #include "wtf/text/WTFString.h" | 52 #include "wtf/text/WTFString.h" |
53 #include <v8-debug.h> | 53 #include <v8-debug.h> |
54 | 54 |
55 namespace WebCore { | 55 namespace blink { |
56 | 56 |
57 static LocalFrame* findFrame(v8::Local<v8::Object> host, v8::Local<v8::Value> da
ta, v8::Isolate* isolate) | 57 static LocalFrame* findFrame(v8::Local<v8::Object> host, v8::Local<v8::Value> da
ta, v8::Isolate* isolate) |
58 { | 58 { |
59 const WrapperTypeInfo* type = WrapperTypeInfo::unwrap(data); | 59 const WrapperTypeInfo* type = WrapperTypeInfo::unwrap(data); |
60 | 60 |
61 if (V8Window::wrapperTypeInfo.equals(type)) { | 61 if (V8Window::wrapperTypeInfo.equals(type)) { |
62 v8::Handle<v8::Object> windowWrapper = V8Window::findInstanceInPrototype
Chain(host, isolate); | 62 v8::Handle<v8::Object> windowWrapper = V8Window::findInstanceInPrototype
Chain(host, isolate); |
63 if (windowWrapper.IsEmpty()) | 63 if (windowWrapper.IsEmpty()) |
64 return 0; | 64 return 0; |
65 return V8Window::toNative(windowWrapper)->frame(); | 65 return V8Window::toNative(windowWrapper)->frame(); |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
241 | 241 |
242 v8::V8::AddMessageListener(messageHandlerInWorker); | 242 v8::V8::AddMessageListener(messageHandlerInWorker); |
243 v8::V8::SetFatalErrorHandler(reportFatalErrorInWorker); | 243 v8::V8::SetFatalErrorHandler(reportFatalErrorInWorker); |
244 | 244 |
245 v8::ResourceConstraints resourceConstraints; | 245 v8::ResourceConstraints resourceConstraints; |
246 uint32_t here; | 246 uint32_t here; |
247 resourceConstraints.set_stack_limit(&here - kWorkerMaxStackSize / sizeof(uin
t32_t*)); | 247 resourceConstraints.set_stack_limit(&here - kWorkerMaxStackSize / sizeof(uin
t32_t*)); |
248 v8::SetResourceConstraints(isolate, &resourceConstraints); | 248 v8::SetResourceConstraints(isolate, &resourceConstraints); |
249 } | 249 } |
250 | 250 |
251 } // namespace WebCore | 251 } // namespace blink |
OLD | NEW |