Changeset 55726 in webkit
- Timestamp:
- Mar 9, 2010 9:22:25 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r55725 r55726 1 2010-03-09 Yury Semikhatsky <yurys@chromium.org> 2 3 Reviewed by Pavel Feldman. 4 5 When enable resource tracking state changes use the same method as 6 location.reload for reloading inspected page. 7 8 https://bugs.webkit.org/show_bug.cgi?id=35923 9 10 * inspector/InspectorBackend.cpp: 11 (WebCore::InspectorBackend::reloadPage): 12 * inspector/InspectorController.cpp: 13 (WebCore::InspectorController::enableResourceTracking): 14 1 15 2010-03-09 Pavel Feldman <pfeldman@chromium.org> 2 16 -
trunk/WebCore/inspector/InspectorBackend.cpp
r55537 r55726 132 132 { 133 133 if (m_inspectorController) 134 m_inspectorController->m_inspectedPage->mainFrame()-> loader()->reload();134 m_inspectorController->m_inspectedPage->mainFrame()->redirectScheduler()->scheduleRefresh(true); 135 135 } 136 136 -
trunk/WebCore/inspector/InspectorController.cpp
r55725 r55726 1120 1120 1121 1121 if (reload) 1122 m_inspectedPage->mainFrame()-> loader()->reload();1122 m_inspectedPage->mainFrame()->redirectScheduler()->scheduleRefresh(true); 1123 1123 } 1124 1124 -
trunk/WebKit/chromium/ChangeLog
r55695 r55726 1 2010-03-09 Yury Semikhatsky <yurys@chromium.org> 2 3 Reviewed by Pavel Feldman. 4 5 Use clean global object for devtools utility context instead of 6 trying to simulate inspected context. 7 8 https://bugs.webkit.org/show_bug.cgi?id=35923 9 10 * src/DebuggerAgentImpl.cpp: 11 * src/DebuggerAgentImpl.h: 12 * src/WebDevToolsAgentImpl.cpp: 13 (WebKit::WebDevToolsAgentImpl::resetInspectorFrontendProxy): 14 1 15 2010-03-08 Alexey Proskuryakov <ap@apple.com> 2 16 -
trunk/WebKit/chromium/src/DebuggerAgentImpl.cpp
r55207 r55726 37 37 #include "Page.h" 38 38 #include "V8Binding.h" 39 #include "V8DOMWindow.h"40 #include "V8Index.h"41 #include "V8Proxy.h"42 39 #include "WebDevToolsAgentImpl.h" 43 40 #include "WebViewImpl.h" … … 51 48 using WebCore::Page; 52 49 using WebCore::String; 53 using WebCore::V8ClassIndex;54 using WebCore::V8DOMWindow;55 using WebCore::V8DOMWrapper;56 using WebCore::V8Proxy;57 50 58 51 namespace WebKit { … … 90 83 m_delegate->debuggerOutput(command); 91 84 m_webdevtoolsAgent->forceRepaint(); 92 }93 94 // static95 void DebuggerAgentImpl::createUtilityContext(Frame* frame, v8::Persistent<v8::Context>* context)96 {97 v8::HandleScope scope;98 bool canExecuteScripts = frame->script()->canExecuteScripts(WebCore::NotAboutToExecuteScript);99 100 // Set up the DOM window as the prototype of the new global object.101 v8::Handle<v8::Context> windowContext = V8Proxy::context(frame);102 v8::Handle<v8::Object> windowGlobal;103 v8::Handle<v8::Object> windowWrapper;104 if (canExecuteScripts) {105 // FIXME: This check prevents renderer from crashing, while providing limited capabilities for106 // DOM inspection, Resources tracking, no scripts support, some timeline profiling. Console will107 // result in exceptions for each evaluation. There is still some work that needs to be done in108 // order to polish the script-less experience.109 windowGlobal = windowContext->Global();110 windowWrapper = V8DOMWrapper::lookupDOMWrapper(V8DOMWindow::GetTemplate(), windowGlobal);111 ASSERT(V8DOMWindow::toNative(windowWrapper) == frame->domWindow());112 }113 114 v8::Handle<v8::ObjectTemplate> globalTemplate = v8::ObjectTemplate::New();115 116 // TODO(yurys): provide a function in v8 bindings that would make the117 // utility context more like main world context of the inspected frame,118 // otherwise we need to manually make it satisfy various invariants119 // that V8Proxy::getEntered and some other V8Proxy methods expect to find120 // on v8 contexts on the contexts stack.121 // See V8Proxy::createNewContext.122 //123 // Install a security handler with V8.124 globalTemplate->SetAccessCheckCallbacks(125 V8DOMWindow::namedSecurityCheck,126 V8DOMWindow::indexedSecurityCheck,127 v8::Integer::New(V8ClassIndex::DOMWINDOW));128 // We set number of internal fields to match that in V8DOMWindow wrapper.129 // See http://crbug.com/28961130 globalTemplate->SetInternalFieldCount(V8DOMWindow::internalFieldCount);131 132 *context = v8::Context::New(0 /* no extensions */, globalTemplate, v8::Handle<v8::Object>());133 v8::Context::Scope contextScope(*context);134 v8::Handle<v8::Object> global = (*context)->Global();135 136 v8::Handle<v8::String> implicitProtoString = v8::String::New("__proto__");137 if (canExecuteScripts)138 global->Set(implicitProtoString, windowWrapper);139 140 // Give the code running in the new context a way to get access to the141 // original context.142 if (canExecuteScripts)143 global->Set(v8::String::New("contentWindow"), windowGlobal);144 85 } 145 86 -
trunk/WebKit/chromium/src/DebuggerAgentImpl.h
r54592 r55726 53 53 class DebuggerAgentImpl : public DebuggerAgent { 54 54 public: 55 // Creates utility context with injected js agent.56 static void createUtilityContext(WebCore::Frame* frame, v8::Persistent<v8::Context>* context);57 58 55 DebuggerAgentImpl(WebKit::WebViewImpl* webViewImpl, 59 56 DebuggerAgentDelegate* delegate, -
trunk/WebKit/chromium/src/WebDevToolsAgentImpl.cpp
r55535 r55726 362 362 { 363 363 disposeUtilityContext(); 364 m_ debuggerAgentImpl->createUtilityContext(m_webViewImpl->page()->mainFrame(), &m_utilityContext);364 m_utilityContext = v8::Context::New(); 365 365 compileUtilityScripts(); 366 366 initDevToolsAgentHost();
Note: See TracChangeset
for help on using the changeset viewer.