Changeset 61467 in webkit
- Timestamp:
- Jun 19, 2010 12:05:45 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r61466 r61467 1 2010-06-19 Aaron Boodman <aa@chromium.org> 2 3 Unreviewed, rolling out r61466. 4 http://trac.webkit.org/changeset/61466 5 https://bugs.webkit.org/show_bug.cgi?id=40816 6 7 Landed wrong change 8 9 * bindings/v8/V8DOMWindowShell.cpp: 10 (WebCore::V8DOMWindowShell::initContextIfNeeded): 11 * bindings/v8/V8DOMWindowShell.h: 12 1 13 2010-06-18 Aaron Boodman <aa@chromium.org> 2 14 -
trunk/WebCore/bindings/v8/V8DOMWindowShell.cpp
r61466 r61467 117 117 V8Proxy::reportUnsafeAccessTo(target, V8Proxy::ReportLater); 118 118 } 119 120 bool V8DOMWindowShell::s_isV8Initialized = false;121 119 122 120 PassRefPtr<V8DOMWindowShell> V8DOMWindowShell::create(Frame* frame) … … 250 248 v8::HandleScope handleScope; 251 249 252 initializeV8IfNeeded(); 250 // Setup the security handlers and message listener. This only has 251 // to be done once. 252 static bool isV8Initialized = false; 253 if (!isV8Initialized) { 254 // Tells V8 not to call the default OOM handler, binding code 255 // will handle it. 256 v8::V8::IgnoreOutOfMemoryException(); 257 v8::V8::SetFatalErrorHandler(reportFatalErrorInV8); 258 259 v8::V8::SetGlobalGCPrologueCallback(&V8GCController::gcPrologue); 260 v8::V8::SetGlobalGCEpilogueCallback(&V8GCController::gcEpilogue); 261 262 v8::V8::AddMessageListener(&V8ConsoleMessage::handler); 263 264 v8::V8::SetFailedAccessCheckCallbackFunction(reportUnsafeJavaScriptAccess); 265 266 isV8Initialized = true; 267 } 268 253 269 254 270 m_context = createNewContext(m_global, 0); … … 293 309 } 294 310 295 void V8DOMWindowShell::initializeV8IfNeeded()296 {297 if (s_isV8Initialized)298 return;299 300 // Tells V8 not to call the default OOM handler, binding code301 // will handle it.302 v8::V8::IgnoreOutOfMemoryException();303 v8::V8::SetFatalErrorHandler(reportFatalErrorInV8);304 305 v8::V8::SetGlobalGCPrologueCallback(&V8GCController::gcPrologue);306 v8::V8::SetGlobalGCEpilogueCallback(&V8GCController::gcEpilogue);307 308 v8::V8::AddMessageListener(&V8ConsoleMessage::handler);309 310 v8::V8::SetFailedAccessCheckCallbackFunction(reportUnsafeJavaScriptAccess);311 312 s_isV8Initialized = true;313 }314 315 void V8DOMWindowShell::uninitializeV8IfNeeded()316 {317 if (!s_isV8Initialized)318 return;319 320 v8::V8::SetFatalErrorHandler(0);321 v8::V8::SetGlobalGCPrologueCallback(0);322 v8::V8::SetGlobalGCEpilogueCallback(0);323 v8::V8::SetFailedAccessCheckCallbackFunction(0);324 v8::V8::RemoveMessageListeners(&V8ConsoleMessage::handler);325 326 // FIXME: This one cannot be undone yet.327 // v8::V8::IgnoreOutOfMemoryException();328 329 s_isV8Initialized = false;330 }331 332 311 v8::Persistent<v8::Context> V8DOMWindowShell::createNewContext(v8::Handle<v8::Object> global, int extensionGroup) 333 312 { -
trunk/WebCore/bindings/v8/V8DOMWindowShell.h
r61466 r61467 51 51 public: 52 52 static PassRefPtr<V8DOMWindowShell> create(Frame*); 53 static void initializeV8IfNeeded();54 static void uninitializeV8IfNeeded();55 53 56 54 v8::Handle<v8::Context> context() const { return m_context; } … … 122 120 v8::Persistent<v8::Object> m_global; 123 121 v8::Persistent<v8::Object> m_document; 124 125 static bool s_isV8Initialized;126 122 }; 127 123 -
trunk/WebKit/chromium/ChangeLog
r61466 r61467 1 2010-06-19 Aaron Boodman <aa@chromium.org> 2 3 Unreviewed, rolling out r61466. 4 http://trac.webkit.org/changeset/61466 5 https://bugs.webkit.org/show_bug.cgi?id=40816 6 7 Landed wrong change 8 9 * src/WebKit.cpp: 10 (WebKit::shutdown): 11 1 12 2010-06-18 Aaron Boodman <aa@chromium.org> 2 13 -
trunk/WebKit/chromium/src/WebKit.cpp
r61466 r61467 42 42 #include "WorkerContextExecutionProxy.h" 43 43 44 #if USE(V8)45 #include "V8DOMWindowShell.h"46 #endif47 48 44 #include <wtf/Assertions.h> 49 45 #include <wtf/Threading.h> … … 83 79 void shutdown() 84 80 { 85 #if USE(V8)86 WebCore::V8DOMWindowShell::uninitializeV8IfNeeded();87 #endif88 81 s_webKitClient = 0; 89 82 }
Note: See TracChangeset
for help on using the changeset viewer.