Title: [113301] trunk/Source/WebKit/chromium
- Revision
- 113301
- Author
- [email protected]
- Date
- 2012-04-05 01:53:05 -0700 (Thu, 05 Apr 2012)
Log Message
[chromium] Only shut down V8 if we actually initialized it
https://bugs.webkit.org/show_bug.cgi?id=83159
Reviewed by Pavel Feldman.
* src/WebKit.cpp:
(WebKit::initialize):
(WebKit::shutdown):
Modified Paths
Diff
Modified: trunk/Source/WebKit/chromium/ChangeLog (113300 => 113301)
--- trunk/Source/WebKit/chromium/ChangeLog 2012-04-05 08:47:21 UTC (rev 113300)
+++ trunk/Source/WebKit/chromium/ChangeLog 2012-04-05 08:53:05 UTC (rev 113301)
@@ -1,3 +1,14 @@
+2012-04-05 Jochen Eisinger <[email protected]>
+
+ [chromium] Only shut down V8 if we actually initialized it
+ https://bugs.webkit.org/show_bug.cgi?id=83159
+
+ Reviewed by Pavel Feldman.
+
+ * src/WebKit.cpp:
+ (WebKit::initialize):
+ (WebKit::shutdown):
+
2012-04-05 Kinuko Yasuda <[email protected]>
Expose DataTransferItem.getAsEntry() to allow users access dropped files as FileEntry
Modified: trunk/Source/WebKit/chromium/src/WebKit.cpp (113300 => 113301)
--- trunk/Source/WebKit/chromium/src/WebKit.cpp 2012-04-05 08:47:21 UTC (rev 113300)
+++ trunk/Source/WebKit/chromium/src/WebKit.cpp 2012-04-05 08:53:05 UTC (rev 113301)
@@ -106,12 +106,11 @@
WebCore::V8BindingPerIsolateData::ensureInitialized(v8::Isolate::GetCurrent());
#if ENABLE(MUTATION_OBSERVERS)
+ // currentThread will always be non-null in production, but can be null in Chromium unit tests.
+ if (WebThread* currentThread = webKitPlatformSupport->currentThread()) {
#ifndef NDEBUG
- v8::V8::AddCallCompletedCallback(&assertV8RecursionScope);
+ v8::V8::AddCallCompletedCallback(&assertV8RecursionScope);
#endif
-
- // currentThread will always be non-null in production, but can be null in Chromium unit tests.
- if (WebThread* currentThread = webKitPlatformSupport->currentThread()) {
ASSERT(!s_endOfTaskRunner);
s_endOfTaskRunner = new EndOfTaskRunner;
currentThread->addTaskObserver(s_endOfTaskRunner);
@@ -150,12 +149,13 @@
void shutdown()
{
+ // WebKit might have been initialized without V8, so be careful not to invoke
+ // V8 specific functions, if V8 was not properly initialized.
#if ENABLE(MUTATION_OBSERVERS)
+ if (s_endOfTaskRunner) {
#ifndef NDEBUG
- v8::V8::RemoveCallCompletedCallback(&assertV8RecursionScope);
+ v8::V8::RemoveCallCompletedCallback(&assertV8RecursionScope);
#endif
-
- if (s_endOfTaskRunner) {
ASSERT(s_webKitPlatformSupport->currentThread());
s_webKitPlatformSupport->currentThread()->removeTaskObserver(s_endOfTaskRunner);
delete s_endOfTaskRunner;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes