Title: [114530] trunk/Source/WebCore
- Revision
- 114530
- Author
- [email protected]
- Date
- 2012-04-18 10:44:46 -0700 (Wed, 18 Apr 2012)
Log Message
Unreviewed, rolling out r114497.
http://trac.webkit.org/changeset/114497
https://bugs.webkit.org/show_bug.cgi?id=84253
Broke compile on Win, including stdio did not help (Requested
by dimich on #webkit).
Patch by Sheriff Bot <[email protected]> on 2012-04-18
* bindings/v8/V8IsolatedContext.cpp:
(WebCore::V8IsolatedContext::V8IsolatedContext):
* bindings/v8/V8Proxy.cpp:
(WebCore::V8Proxy::evaluateInIsolatedWorld):
(WebCore::V8Proxy::setInjectedScriptContextDebugId):
(WebCore):
* bindings/v8/V8Proxy.h:
(V8Proxy):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (114529 => 114530)
--- trunk/Source/WebCore/ChangeLog 2012-04-18 17:37:41 UTC (rev 114529)
+++ trunk/Source/WebCore/ChangeLog 2012-04-18 17:44:46 UTC (rev 114530)
@@ -1,3 +1,21 @@
+2012-04-18 Sheriff Bot <[email protected]>
+
+ Unreviewed, rolling out r114497.
+ http://trac.webkit.org/changeset/114497
+ https://bugs.webkit.org/show_bug.cgi?id=84253
+
+ Broke compile on Win, including stdio did not help (Requested
+ by dimich on #webkit).
+
+ * bindings/v8/V8IsolatedContext.cpp:
+ (WebCore::V8IsolatedContext::V8IsolatedContext):
+ * bindings/v8/V8Proxy.cpp:
+ (WebCore::V8Proxy::evaluateInIsolatedWorld):
+ (WebCore::V8Proxy::setInjectedScriptContextDebugId):
+ (WebCore):
+ * bindings/v8/V8Proxy.h:
+ (V8Proxy):
+
2012-04-18 Alexandru Chiculita <[email protected]>
[CSS Filters] Drop-shadow and blur can avoid using full source image
Modified: trunk/Source/WebCore/bindings/v8/V8IsolatedContext.cpp (114529 => 114530)
--- trunk/Source/WebCore/bindings/v8/V8IsolatedContext.cpp 2012-04-18 17:37:41 UTC (rev 114529)
+++ trunk/Source/WebCore/bindings/v8/V8IsolatedContext.cpp 2012-04-18 17:44:46 UTC (rev 114530)
@@ -55,25 +55,11 @@
delete context;
}
-static void setInjectedScriptContextDebugId(v8::Handle<v8::Context> targetContext, int debugId)
-{
- char buffer[32];
- if (debugId == -1)
- snprintf(buffer, sizeof(buffer), "injected");
- else
- snprintf(buffer, sizeof(buffer), "injected,%d", debugId);
- targetContext->SetData(v8::String::New(buffer));
-}
-
V8IsolatedContext::V8IsolatedContext(V8Proxy* proxy, int extensionGroup, int worldId)
: m_world(IsolatedWorld::create(worldId)),
m_frame(proxy->frame())
{
v8::HandleScope scope;
- v8::Handle<v8::Context> mainWorldContext = proxy->windowShell()->context();
- if (mainWorldContext.IsEmpty())
- return;
-
// FIXME: We should be creating a new V8DOMWindowShell here instead of riping out the context.
m_context = SharedPersistent<v8::Context>::create(proxy->windowShell()->createNewContext(v8::Handle<v8::Object>(), extensionGroup, m_world->id()));
if (m_context->get().IsEmpty())
@@ -82,9 +68,6 @@
// Run code in the new context.
v8::Context::Scope contextScope(m_context->get());
- // Setup context id for JS debugger.
- setInjectedScriptContextDebugId(m_context->get(), proxy->contextDebugId(mainWorldContext));
-
getGlobalObject(m_context->get())->SetPointerInInternalField(V8DOMWindow::enteredIsolatedWorldIndex, this);
m_perContextData = V8BindingPerContextData::create(m_context->get());
Modified: trunk/Source/WebCore/bindings/v8/V8Proxy.cpp (114529 => 114530)
--- trunk/Source/WebCore/bindings/v8/V8Proxy.cpp 2012-04-18 17:37:41 UTC (rev 114529)
+++ trunk/Source/WebCore/bindings/v8/V8Proxy.cpp 2012-04-18 17:44:46 UTC (rev 114530)
@@ -239,6 +239,13 @@
// FIXME: We should change this to using window shells to match JSC.
m_isolatedWorlds.set(worldID, isolatedContext);
+
+ // Setup context id for JS debugger.
+ if (!setInjectedScriptContextDebugId(isolatedContext->context())) {
+ m_isolatedWorlds.take(worldID);
+ delete isolatedContext;
+ return;
+ }
}
IsolatedWorldSecurityOriginMap::iterator securityOriginIter = m_isolatedWorldSecurityOrigins.find(worldID);
@@ -271,6 +278,25 @@
iter->second->setSecurityOrigin(securityOrigin);
}
+bool V8Proxy::setInjectedScriptContextDebugId(v8::Handle<v8::Context> targetContext)
+{
+ // Setup context id for JS debugger.
+ v8::Context::Scope contextScope(targetContext);
+ v8::Handle<v8::Context> context = windowShell()->context();
+ if (context.IsEmpty())
+ return false;
+ int debugId = contextDebugId(context);
+
+ char buffer[32];
+ if (debugId == -1)
+ snprintf(buffer, sizeof(buffer), "injected");
+ else
+ snprintf(buffer, sizeof(buffer), "injected,%d", debugId);
+ targetContext->SetData(v8::String::New(buffer));
+
+ return true;
+}
+
PassOwnPtr<v8::ScriptData> V8Proxy::precompileScript(v8::Handle<v8::String> code, CachedScript* cachedScript)
{
// A pseudo-randomly chosen ID used to store and retrieve V8 ScriptData from
Modified: trunk/Source/WebCore/bindings/v8/V8Proxy.h (114529 => 114530)
--- trunk/Source/WebCore/bindings/v8/V8Proxy.h 2012-04-18 17:37:41 UTC (rev 114529)
+++ trunk/Source/WebCore/bindings/v8/V8Proxy.h 2012-04-18 17:44:46 UTC (rev 114530)
@@ -272,6 +272,9 @@
PassOwnPtr<v8::ScriptData> precompileScript(v8::Handle<v8::String>, CachedScript*);
+ // Returns false when we're out of memory in V8.
+ bool setInjectedScriptContextDebugId(v8::Handle<v8::Context> targetContext);
+
static const char* rangeExceptionName(int exceptionCode);
static const char* eventExceptionName(int exceptionCode);
static const char* xmlHttpRequestExceptionName(int exceptionCode);
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes