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 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 if (exception && !exception->messageForConsole().isEmpty()) | 117 if (exception && !exception->messageForConsole().isEmpty()) |
118 event->setUnsanitizedMessage("Uncaught " + exception->toStringFo
rConsole()); | 118 event->setUnsanitizedMessage("Uncaught " + exception->toStringFo
rConsole()); |
119 } | 119 } |
120 } | 120 } |
121 | 121 |
122 // This method might be called while we're creating a new context. In this c
ase, we | 122 // This method might be called while we're creating a new context. In this c
ase, we |
123 // avoid storing the exception object, as we can't create a wrapper during c
ontext creation. | 123 // avoid storing the exception object, as we can't create a wrapper during c
ontext creation. |
124 // FIXME: Can we even get here during initialization now that we bail out wh
en GetEntered returns an empty handle? | 124 // FIXME: Can we even get here during initialization now that we bail out wh
en GetEntered returns an empty handle? |
125 DOMWrapperWorld* world = DOMWrapperWorld::current(); | 125 DOMWrapperWorld* world = DOMWrapperWorld::current(); |
126 Frame* frame = firstWindow->document()->frame(); | 126 Frame* frame = firstWindow->document()->frame(); |
127 if (world && frame && frame->script()->existingWindowShell(world)) | 127 if (world && frame && frame->script().existingWindowShell(world)) |
128 V8ErrorHandler::storeExceptionOnErrorEventWrapper(event.get(), data, v8:
:Isolate::GetCurrent()); | 128 V8ErrorHandler::storeExceptionOnErrorEventWrapper(event.get(), data, v8:
:Isolate::GetCurrent()); |
129 firstWindow->document()->reportException(event.release(), callStack, corsSta
tus); | 129 firstWindow->document()->reportException(event.release(), callStack, corsSta
tus); |
130 } | 130 } |
131 | 131 |
132 static void failedAccessCheckCallbackInMainThread(v8::Local<v8::Object> host, v8
::AccessType type, v8::Local<v8::Value> data) | 132 static void failedAccessCheckCallbackInMainThread(v8::Local<v8::Object> host, v8
::AccessType type, v8::Local<v8::Value> data) |
133 { | 133 { |
134 Frame* target = findFrame(host, data, v8::Isolate::GetCurrent()); | 134 Frame* target = findFrame(host, data, v8::Isolate::GetCurrent()); |
135 if (!target) | 135 if (!target) |
136 return; | 136 return; |
137 DOMWindow* targetWindow = target->domWindow(); | 137 DOMWindow* targetWindow = target->domWindow(); |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
220 v8::ResourceConstraints resourceConstraints; | 220 v8::ResourceConstraints resourceConstraints; |
221 v8::ConfigureResourceConstraintsForCurrentPlatform(&resourceConstraints); | 221 v8::ConfigureResourceConstraintsForCurrentPlatform(&resourceConstraints); |
222 uint32_t here; | 222 uint32_t here; |
223 resourceConstraints.set_stack_limit(&here - kWorkerMaxStackSize / sizeof(uin
t32_t*)); | 223 resourceConstraints.set_stack_limit(&here - kWorkerMaxStackSize / sizeof(uin
t32_t*)); |
224 v8::SetResourceConstraints(&resourceConstraints); | 224 v8::SetResourceConstraints(&resourceConstraints); |
225 | 225 |
226 V8PerIsolateData::ensureInitialized(isolate); | 226 V8PerIsolateData::ensureInitialized(isolate); |
227 } | 227 } |
228 | 228 |
229 } // namespace WebCore | 229 } // namespace WebCore |
OLD | NEW |