Title: [139990] trunk/Source/WebCore
- Revision
- 139990
- Author
- commit-qu...@webkit.org
- Date
- 2013-01-17 10:34:43 -0800 (Thu, 17 Jan 2013)
Log Message
[V8] Remove a --es5_readonly flag from V8 initialization and address duplicated code
https://bugs.webkit.org/show_bug.cgi?id=106790
Patch by Peter Rybin <peter.ry...@gmail.com> on 2013-01-17
Reviewed by Kentaro Hara.
Couple of statements are moved to a newly created method. Old V8 flag setter is removed
according to FIXME and per V8 change http://code.google.com/p/v8/source/detail?r=12415
* bindings/v8/V8Initializer.cpp:
(WebCore::initializeV8Common): newly created method
(WebCore):
(WebCore::V8Initializer::initializeMainThreadIfNeeded):
(WebCore::V8Initializer::initializeWorker):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (139989 => 139990)
--- trunk/Source/WebCore/ChangeLog 2013-01-17 18:33:13 UTC (rev 139989)
+++ trunk/Source/WebCore/ChangeLog 2013-01-17 18:34:43 UTC (rev 139990)
@@ -1,3 +1,19 @@
+2013-01-17 Peter Rybin <peter.ry...@gmail.com>
+
+ [V8] Remove a --es5_readonly flag from V8 initialization and address duplicated code
+ https://bugs.webkit.org/show_bug.cgi?id=106790
+
+ Reviewed by Kentaro Hara.
+
+ Couple of statements are moved to a newly created method. Old V8 flag setter is removed
+ according to FIXME and per V8 change http://code.google.com/p/v8/source/detail?r=12415
+
+ * bindings/v8/V8Initializer.cpp:
+ (WebCore::initializeV8Common): newly created method
+ (WebCore):
+ (WebCore::V8Initializer::initializeMainThreadIfNeeded):
+ (WebCore::V8Initializer::initializeWorker):
+
2013-01-17 John Bauman <jbau...@chromium.org>
Fix texImage2D from a WebGL canvas.
Modified: trunk/Source/WebCore/bindings/v8/V8Initializer.cpp (139989 => 139990)
--- trunk/Source/WebCore/bindings/v8/V8Initializer.cpp 2013-01-17 18:33:13 UTC (rev 139989)
+++ trunk/Source/WebCore/bindings/v8/V8Initializer.cpp 2013-01-17 18:34:43 UTC (rev 139990)
@@ -103,6 +103,13 @@
targetWindow->printErrorMessage(targetWindow->crossDomainAccessErrorMessage(activeDOMWindow(BindingState::instance())));
}
+static void initializeV8Common()
+{
+ v8::V8::AddGCPrologueCallback(V8GCController::gcPrologue);
+ v8::V8::AddGCEpilogueCallback(V8GCController::gcEpilogue);
+ v8::V8::IgnoreOutOfMemoryException();
+}
+
void V8Initializer::initializeMainThreadIfNeeded(v8::Isolate* isolate)
{
ASSERT(isMainThread());
@@ -112,20 +119,15 @@
return;
initialized = true;
- v8::V8::IgnoreOutOfMemoryException();
+ initializeV8Common();
+
v8::V8::SetFatalErrorHandler(reportFatalErrorInMainThread);
- v8::V8::AddGCPrologueCallback(V8GCController::gcPrologue);
- v8::V8::AddGCEpilogueCallback(V8GCController::gcEpilogue);
v8::V8::AddMessageListener(messageHandlerInMainThread);
v8::V8::SetFailedAccessCheckCallbackFunction(failedAccessCheckCallbackInMainThread);
#if ENABLE(_javascript__DEBUGGER)
ScriptProfiler::initialize();
#endif
V8PerIsolateData::ensureInitialized(isolate);
-
- // FIXME: Remove the following 2 lines when V8 default has changed.
- const char es5ReadonlyFlag[] = "--es5_readonly";
- v8::V8::SetFlagsFromString(es5ReadonlyFlag, sizeof(es5ReadonlyFlag));
}
static void reportFatalErrorInWorker(const char* location, const char* message)
@@ -158,17 +160,11 @@
void V8Initializer::initializeWorker(v8::Isolate* isolate)
{
+ initializeV8Common();
+
v8::V8::AddMessageListener(messageHandlerInWorker);
- v8::V8::IgnoreOutOfMemoryException();
v8::V8::SetFatalErrorHandler(reportFatalErrorInWorker);
- v8::V8::AddGCPrologueCallback(V8GCController::gcPrologue);
- v8::V8::AddGCEpilogueCallback(V8GCController::gcEpilogue);
-
- // FIXME: Remove the following 2 lines when V8 default has changed.
- const char es5ReadonlyFlag[] = "--es5_readonly";
- v8::V8::SetFlagsFromString(es5ReadonlyFlag, sizeof(es5ReadonlyFlag));
-
v8::ResourceConstraints resourceConstraints;
uint32_t here;
resourceConstraints.set_stack_limit(&here - kWorkerMaxStackSize / sizeof(uint32_t*));
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes