Home | History | Annotate | Download | only in v8

Lines Matching refs:V8

27 #include "bindings/v8/V8Initializer.h"
33 #include "bindings/v8/DOMWrapperWorld.h"
34 #include "bindings/v8/ScriptCallStackFactory.h"
35 #include "bindings/v8/ScriptController.h"
36 #include "bindings/v8/ScriptProfiler.h"
37 #include "bindings/v8/V8Binding.h"
38 #include "bindings/v8/V8GCController.h"
39 #include "bindings/v8/V8HiddenPropertyName.h"
40 #include "bindings/v8/V8PerContextData.h"
49 #include <v8-debug.h>
55 static Frame* findFrame(v8::Local<v8::Object> host, v8::Local<v8::Value> data, v8::Isolate* isolate)
60 v8::Handle<v8::Object> windowWrapper = host->FindInstanceInPrototypeChain(V8Window::GetTemplate(isolate, worldTypeInMainThread(isolate)));
80 printf("V8 error: %s (%s). Current memory usage: %d MB\n", message, location, memoryUsageMB);
84 static void messageHandlerInMainThread(v8::Handle<v8::Message> message, v8::Handle<v8::Value> data)
92 v8::Handle<v8::StackTrace> stackTrace = message->GetStackTrace();
98 v8::Handle<v8::Value> resourceName = message->GetScriptResourceName();
109 v8::Local<v8::Value> wrappedEvent = toV8(event.get(), v8::Handle<v8::Object>(), v8::Isolate::GetCurrent());
112 v8::Local<v8::Object>::Cast(wrappedEvent)->SetHiddenValue(V8HiddenPropertyName::error(), data);
119 static void failedAccessCheckCallbackInMainThread(v8::Local<v8::Object> host, v8::AccessType type, v8::Local<v8::Value> data)
121 Frame* target = findFrame(host, data, v8::Isolate::GetCurrent());
126 setDOMException(SecurityError, targetWindow->crossDomainAccessErrorMessage(activeDOMWindow()), v8::Isolate::GetCurrent());
129 static bool codeGenerationCheckCallbackInMainThread(v8::Local<v8::Context> context)
140 v8::V8::AddGCPrologueCallback(V8GCController::gcPrologue);
141 v8::V8::AddGCEpilogueCallback(V8GCController::gcEpilogue);
142 v8::V8::IgnoreOutOfMemoryException();
144 v8::Debug::SetLiveEditEnabled(false);
147 void V8Initializer::initializeMainThreadIfNeeded(v8::Isolate* isolate)
158 v8::V8::SetFatalErrorHandler(reportFatalErrorInMainThread);
159 v8::V8::AddMessageListener(messageHandlerInMainThread);
160 v8::V8::SetFailedAccessCheckCallbackFunction(failedAccessCheckCallbackInMainThread);
161 v8::V8::SetAllowCodeGenerationFromStringsCallback(codeGenerationCheckCallbackInMainThread);
168 // FIXME: We temporarily deal with V8 internal error situations such as out-of-memory by crashing the worker.
172 static void messageHandlerInWorker(v8::Handle<v8::Message> message, v8::Handle<v8::Value> data)
186 v8::Local<v8::Value> wrappedEvent = toV8(event.get(), v8::Handle<v8::Object>(), v8::Isolate::GetCurrent());
189 v8::Local<v8::Object>::Cast(wrappedEvent)->SetHiddenValue(V8HiddenPropertyName::error(), data);
200 void V8Initializer::initializeWorker(v8::Isolate* isolate)
204 v8::V8::AddMessageListener(messageHandlerInWorker);
205 v8::V8::SetFatalErrorHandler(reportFatalErrorInWorker);
207 v8::ResourceConstraints resourceConstraints;
210 v8::SetResourceConstraints(&resourceConstraints);