Changeset 54576 in webkit
- Timestamp:
- Feb 9, 2010 6:02:30 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r54571 r54576 1 2010-02-09 Mikhail Naganov <mnaganov@chromium.org> 2 3 Reviewed by Pavel Feldman. 4 5 Continuing debugger and profiler unforking: narrow scope of JSC-specific ifdefs. 6 Also, enable JAVASCRIPT_DEBUGGER explicitly in features, it appears to be required 7 for really enabling it in V8 bindings generation. 8 9 https://bugs.webkit.org/show_bug.cgi?id=34706 10 11 * inspector/InjectedScriptHost.idl: 12 * inspector/InspectorBackend.cpp: 13 (WebCore::InspectorBackend::currentCallFrame): 14 (WebCore::InspectorBackend::getProfile): 15 * inspector/InspectorBackend.h: 16 * inspector/InspectorBackend.idl: 17 * inspector/InspectorController.cpp: 18 (WebCore::InspectorController::InspectorController): 19 (WebCore::InspectorController::addProfile): 20 (WebCore::InspectorController::getProfile): 21 (WebCore::InspectorController::startUserInitiatedProfiling): 22 (WebCore::InspectorController::stopUserInitiatedProfiling): 23 (WebCore::InspectorController::enableProfiler): 24 (WebCore::InspectorController::disableProfiler): 25 * inspector/InspectorController.h: 26 * inspector/InspectorFrontend.cpp: 27 (WebCore::InspectorFrontend::pausedScript): 28 (WebCore::InspectorFrontend::resumedScript): 29 (WebCore::InspectorFrontend::profilerWasEnabled): 30 (WebCore::InspectorFrontend::profilerWasDisabled): 31 (WebCore::InspectorFrontend::didGetProfile): 32 * inspector/InspectorFrontend.h: 33 * page/Console.idl: 34 1 35 2010-02-09 Gavin Barraclough <barraclough@apple.com> 2 36 -
trunk/WebCore/inspector/InjectedScriptHost.idl
r54421 r54576 42 42 long pushNodeByPathToFrontend(in DOMString path); 43 43 44 #if defined(ENABLE_JAVASCRIPT_DEBUGGER) && ENABLE_JAVASCRIPT_DEBUGGER 44 #if defined(ENABLE_JAVASCRIPT_DEBUGGER) && ENABLE_JAVASCRIPT_DEBUGGER && !(defined(V8_BINDING) && V8_BINDING) 45 45 [Custom] DOMObject currentCallFrame(); 46 46 [Custom] boolean isActivation(in DOMObject object); -
trunk/WebCore/inspector/InspectorBackend.cpp
r54421 r54576 223 223 } 224 224 225 JavaScriptCallFrame* InspectorBackend::currentCallFrame() const 226 { 227 return JavaScriptDebugServer::shared().currentCallFrame(); 228 } 229 #endif 230 231 #if ENABLE(JAVASCRIPT_DEBUGGER) 225 232 bool InspectorBackend::profilerEnabled() 226 233 { … … 264 271 if (m_inspectorController) 265 272 m_inspectorController->getProfile(callId, uid); 266 }267 268 JavaScriptCallFrame* InspectorBackend::currentCallFrame() const269 {270 return JavaScriptDebugServer::shared().currentCallFrame();271 273 } 272 274 #endif -
trunk/WebCore/inspector/InspectorBackend.h
r54329 r54576 93 93 void stepOutOfFunctionInDebugger(); 94 94 95 JavaScriptCallFrame* currentCallFrame() const; 96 #endif 97 #if ENABLE(JAVASCRIPT_DEBUGGER) 95 98 bool profilerEnabled(); 96 99 void enableProfiler(bool always); … … 102 105 void getProfileHeaders(long callId); 103 106 void getProfile(long callId, unsigned uid); 104 105 JavaScriptCallFrame* currentCallFrame() const;106 107 #endif 107 108 -
trunk/WebCore/inspector/InspectorBackend.idl
r53855 r54576 48 48 void stopTimelineProfiler(); 49 49 50 #if defined(ENABLE_JAVASCRIPT_DEBUGGER) && ENABLE_JAVASCRIPT_DEBUGGER 50 #if defined(ENABLE_JAVASCRIPT_DEBUGGER) && ENABLE_JAVASCRIPT_DEBUGGER && !(defined(V8_BINDING) && V8_BINDING) 51 51 boolean debuggerEnabled(); 52 52 void enableDebugger(in boolean always); … … 66 66 long pauseOnExceptionsState(); 67 67 void setPauseOnExceptionsState(in long pauseOnExceptionsState); 68 68 #endif 69 #if defined(ENABLE_JAVASCRIPT_DEBUGGER) && ENABLE_JAVASCRIPT_DEBUGGER 69 70 boolean profilerEnabled(); 70 71 void enableProfiler(in boolean always); -
trunk/WebCore/inspector/InspectorController.cpp
r54435 r54576 147 147 , m_debuggerEnabled(false) 148 148 , m_attachDebuggerWhenShown(false) 149 , m_profilerEnabled(false) 149 #endif 150 #if ENABLE(JAVASCRIPT_DEBUGGER) 151 , m_profilerEnabled(!WTF_USE_JSC) 150 152 , m_recordingUserInitiatedProfile(false) 151 153 , m_currentUserInitiatedProfileNumber(-1) … … 1343 1345 } 1344 1346 1345 #if ENABLE(JAVASCRIPT_DEBUGGER) && USE(JSC)1347 #if ENABLE(JAVASCRIPT_DEBUGGER) 1346 1348 void InspectorController::addProfile(PassRefPtr<ScriptProfile> prpProfile, unsigned lineNumber, const String& sourceURL) 1347 1349 { … … 1353 1355 1354 1356 if (m_frontend) { 1357 #if USE(JSC) 1355 1358 JSLock lock(SilenceAssertionsOnly); 1359 #endif 1356 1360 m_frontend->addProfileHeader(createProfileHeader(*profile)); 1357 1361 } … … 1391 1395 return; 1392 1396 ProfilesMap::iterator it = m_profiles.find(uid); 1397 #if USE(JSC) 1393 1398 if (it != m_profiles.end()) 1394 1399 m_frontend->didGetProfile(callId, toJS(m_frontendScriptState, it->second.get())); 1400 #endif 1395 1401 } 1396 1402 … … 1424 1430 if (!profilerEnabled()) { 1425 1431 enableProfiler(false, true); 1432 #if USE(JSC) 1426 1433 JavaScriptDebugServer::shared().recompileAllJSFunctions(); 1434 #endif 1427 1435 } 1428 1436 … … 1431 1439 String title = getCurrentUserInitiatedProfileName(true); 1432 1440 1441 #if USE(JSC) 1433 1442 ExecState* scriptState = toJSDOMWindow(m_inspectedPage->mainFrame(), debuggerWorld())->globalExec(); 1443 #else 1444 ScriptState* scriptState = 0; 1445 #endif 1434 1446 ScriptProfiler::start(scriptState, title); 1435 1447 … … 1448 1460 String title = getCurrentUserInitiatedProfileName(); 1449 1461 1462 #if USE(JSC) 1450 1463 ExecState* scriptState = toJSDOMWindow(m_inspectedPage->mainFrame(), debuggerWorld())->globalExec(); 1464 #else 1465 ScriptState* scriptState = 0; 1466 #endif 1451 1467 RefPtr<ScriptProfile> profile = ScriptProfiler::stop(scriptState, title); 1452 1468 if (profile) … … 1473 1489 m_profilerEnabled = true; 1474 1490 1491 #if USE(JSC) 1475 1492 if (!skipRecompile) 1476 1493 JavaScriptDebugServer::shared().recompileAllJSFunctionsSoon(); 1494 #endif 1477 1495 1478 1496 if (m_frontend) … … 1490 1508 m_profilerEnabled = false; 1491 1509 1510 #if USE(JSC) 1492 1511 JavaScriptDebugServer::shared().recompileAllJSFunctionsSoon(); 1512 #endif 1493 1513 1494 1514 if (m_frontend) 1495 1515 m_frontend->profilerWasDisabled(); 1496 1516 } 1497 1517 #endif 1518 1519 #if ENABLE(JAVASCRIPT_DEBUGGER) && USE(JSC) 1498 1520 void InspectorController::enableDebuggerFromFrontend(bool always) 1499 1521 { -
trunk/WebCore/inspector/InspectorController.h
r54334 r54576 221 221 void markTimeline(const String& message); 222 222 223 #if ENABLE(JAVASCRIPT_DEBUGGER) && USE(JSC)223 #if ENABLE(JAVASCRIPT_DEBUGGER) 224 224 void addProfile(PassRefPtr<ScriptProfile>, unsigned lineNumber, const String& sourceURL); 225 225 void addProfileFinishedMessageToConsole(PassRefPtr<ScriptProfile>, unsigned lineNumber, const String& sourceURL); … … 235 235 void disableProfiler(bool always = false); 236 236 bool profilerEnabled() const { return enabled() && m_profilerEnabled; } 237 237 #endif 238 239 #if ENABLE(JAVASCRIPT_DEBUGGER) && USE(JSC) 238 240 void enableDebugger(); 239 241 void disableDebugger(bool always = false); … … 269 271 void deleteCookie(const String& cookieName, const String& domain); 270 272 271 #if ENABLE(JAVASCRIPT_DEBUGGER) && USE(JSC)273 #if ENABLE(JAVASCRIPT_DEBUGGER) 272 274 typedef HashMap<unsigned int, RefPtr<ScriptProfile> > ProfilesMap; 273 275 … … 350 352 bool m_debuggerEnabled; 351 353 bool m_attachDebuggerWhenShown; 354 #endif 355 #if ENABLE(JAVASCRIPT_DEBUGGER) 352 356 bool m_profilerEnabled; 353 357 bool m_recordingUserInitiatedProfile; -
trunk/WebCore/inspector/InspectorFrontend.cpp
r54421 r54576 267 267 } 268 268 269 void InspectorFrontend::profilerWasEnabled()270 {271 callSimpleFunction("profilerWasEnabled");272 }273 274 void InspectorFrontend::profilerWasDisabled()275 {276 callSimpleFunction("profilerWasDisabled");277 }278 279 269 void InspectorFrontend::parsedScriptSource(const JSC::SourceCode& source) 280 270 { … … 300 290 } 301 291 292 void InspectorFrontend::pausedScript(SerializedScriptValue* callFrames) 293 { 294 ScriptValue callFramesValue = ScriptValue::deserialize(scriptState(), callFrames); 295 ScriptFunctionCall function(m_webInspector, "dispatch"); 296 function.appendArgument("pausedScript"); 297 function.appendArgument(callFramesValue); 298 function.call(); 299 } 300 301 void InspectorFrontend::resumedScript() 302 { 303 callSimpleFunction("resumedScript"); 304 } 305 #endif 306 307 #if ENABLE(JAVASCRIPT_DEBUGGER) 308 void InspectorFrontend::profilerWasEnabled() 309 { 310 callSimpleFunction("profilerWasEnabled"); 311 } 312 313 void InspectorFrontend::profilerWasDisabled() 314 { 315 callSimpleFunction("profilerWasDisabled"); 316 } 317 302 318 void InspectorFrontend::addProfileHeader(const ScriptValue& profile) 303 319 { … … 332 348 function.appendArgument(profile); 333 349 function.call(); 334 }335 336 void InspectorFrontend::pausedScript(SerializedScriptValue* callFrames)337 {338 ScriptValue callFramesValue = ScriptValue::deserialize(scriptState(), callFrames);339 ScriptFunctionCall function(m_webInspector, "dispatch");340 function.appendArgument("pausedScript");341 function.appendArgument(callFramesValue);342 function.call();343 }344 345 void InspectorFrontend::resumedScript()346 {347 callSimpleFunction("resumedScript");348 350 } 349 351 #endif -
trunk/WebCore/inspector/InspectorFrontend.h
r54421 r54576 89 89 void debuggerWasEnabled(); 90 90 void debuggerWasDisabled(); 91 void parsedScriptSource(const JSC::SourceCode&); 92 void failedToParseScriptSource(const JSC::SourceCode&, int errorLine, const JSC::UString& errorMessage); 93 void pausedScript(SerializedScriptValue* callFrames); 94 void resumedScript(); 95 #endif 96 #if ENABLE(JAVASCRIPT_DEBUGGER) 91 97 void profilerWasEnabled(); 92 98 void profilerWasDisabled(); 93 void parsedScriptSource(const JSC::SourceCode&);94 void failedToParseScriptSource(const JSC::SourceCode&, int errorLine, const JSC::UString& errorMessage);95 99 void addProfileHeader(const ScriptValue& profile); 96 100 void setRecordingProfile(bool isProfiling); 97 101 void didGetProfileHeaders(int callId, const ScriptArray& headers); 98 102 void didGetProfile(int callId, const ScriptValue& profile); 99 void pausedScript(SerializedScriptValue* callFrames);100 void resumedScript();101 103 #endif 102 104 -
trunk/WebCore/page/Console.idl
r54417 r54576 31 31 interface [OmitConstructor] Console { 32 32 33 #if defined(ENABLE_JAVASCRIPT_DEBUGGER) && ENABLE_JAVASCRIPT_DEBUGGER 33 // Not enabled in V8 because it requires request-reply style. 34 #if defined(ENABLE_JAVASCRIPT_DEBUGGER) && ENABLE_JAVASCRIPT_DEBUGGER && !(defined(V8_BINDING) && V8_BINDING) 34 35 readonly attribute [CustomGetter] Array profiles; 35 36 #endif -
trunk/WebKit/chromium/ChangeLog
r54565 r54576 1 2010-02-09 Mikhail Naganov <mnaganov@chromium.org> 2 3 Reviewed by Pavel Feldman. 4 5 Continuing debugger and profiler unforking: narrow scope of JSC-specific ifdefs. 6 Also, enable JAVASCRIPT_DEBUGGER explicitly in features, it appears to be required 7 for really enabling it in V8 bindings generation. 8 9 https://bugs.webkit.org/show_bug.cgi?id=34706 10 11 * features.gypi: 12 1 13 2010-02-09 Jian Li <jianli@chromium.org> 2 14 -
trunk/WebKit/chromium/features.gypi
r54417 r54576 48 48 'ENABLE_DOM_STORAGE=1', 49 49 'ENABLE_GEOLOCATION=1', 50 'ENABLE_JAVASCRIPT_DEBUGGER=1', 50 51 'ENABLE_JSC_MULTIPLE_THREADS=0', 51 52 'ENABLE_ICONDATABASE=0',
Note: See TracChangeset
for help on using the changeset viewer.