[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.21-584-g1e41756
eric at webkit.org
eric at webkit.org
Fri Feb 26 22:18:50 UTC 2010
The following commit has been merged in the webkit-1.1 branch:
commit 89d63289bd3900f32a32ee553dff6d787a27f420
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Feb 12 15:38:37 2010 +0000
2010-02-12 Yury Semikhatsky <yurys at chromium.org>
Reviewed by Pavel Feldman.
Chromium: Web Inspector on an element in a page where JS is blocked crashes the renderer
https://bugs.webkit.org/show_bug.cgi?id=34890
* src/DebuggerAgentImpl.cpp:
(WebKit::DebuggerAgentImpl::createUtilityContext):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@54725 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit/chromium/ChangeLog b/WebKit/chromium/ChangeLog
index e02f216..996b5c5 100644
--- a/WebKit/chromium/ChangeLog
+++ b/WebKit/chromium/ChangeLog
@@ -1,3 +1,14 @@
+2010-02-12 Yury Semikhatsky <yurys at chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ Chromium: Web Inspector on an element in a page where JS is blocked crashes the renderer
+
+ https://bugs.webkit.org/show_bug.cgi?id=34890
+
+ * src/DebuggerAgentImpl.cpp:
+ (WebKit::DebuggerAgentImpl::createUtilityContext):
+
2010-02-11 Mikhail Naganov <mnaganov at chromium.org>
Reviewed by Pavel Feldman.
diff --git a/WebKit/chromium/src/DebuggerAgentImpl.cpp b/WebKit/chromium/src/DebuggerAgentImpl.cpp
index 3d27721..d592710 100644
--- a/WebKit/chromium/src/DebuggerAgentImpl.cpp
+++ b/WebKit/chromium/src/DebuggerAgentImpl.cpp
@@ -95,13 +95,21 @@ void DebuggerAgentImpl::debuggerOutput(const String& command)
void DebuggerAgentImpl::createUtilityContext(Frame* frame, v8::Persistent<v8::Context>* context)
{
v8::HandleScope scope;
+ bool canExecuteScripts = frame->script()->canExecuteScripts();
// Set up the DOM window as the prototype of the new global object.
v8::Handle<v8::Context> windowContext = V8Proxy::context(frame);
- v8::Handle<v8::Object> windowGlobal = windowContext->Global();
- v8::Handle<v8::Object> windowWrapper = V8DOMWrapper::lookupDOMWrapper(V8DOMWindow::GetTemplate(), windowGlobal);
-
- ASSERT(V8DOMWindow::toNative(windowWrapper) == frame->domWindow());
+ v8::Handle<v8::Object> windowGlobal;
+ v8::Handle<v8::Object> windowWrapper;
+ if (canExecuteScripts) {
+ // FIXME: This check prevents renderer from crashing, while providing limited capabilities for
+ // DOM inspection, Resources tracking, no scripts support, some timeline profiling. Console will
+ // result in exceptions for each evaluation. There is still some work that needs to be done in
+ // order to polish the script-less experience.
+ windowGlobal = windowContext->Global();
+ windowWrapper = V8DOMWrapper::lookupDOMWrapper(V8DOMWindow::GetTemplate(), windowGlobal);
+ ASSERT(V8DOMWindow::toNative(windowWrapper) == frame->domWindow());
+ }
v8::Handle<v8::ObjectTemplate> globalTemplate = v8::ObjectTemplate::New();
@@ -126,11 +134,13 @@ void DebuggerAgentImpl::createUtilityContext(Frame* frame, v8::Persistent<v8::Co
v8::Handle<v8::Object> global = (*context)->Global();
v8::Handle<v8::String> implicitProtoString = v8::String::New("__proto__");
- global->Set(implicitProtoString, windowWrapper);
+ if (canExecuteScripts)
+ global->Set(implicitProtoString, windowWrapper);
// Give the code running in the new context a way to get access to the
// original context.
- global->Set(v8::String::New("contentWindow"), windowGlobal);
+ if (canExecuteScripts)
+ global->Set(v8::String::New("contentWindow"), windowGlobal);
}
String DebuggerAgentImpl::executeUtilityFunction(
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list