WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
34481
Web Inspector: Start unforking profiler and debugger stuff
https://bugs.webkit.org/show_bug.cgi?id=34481
Summary
Web Inspector: Start unforking profiler and debugger stuff
Mikhail Naganov
Reported
2010-02-02 08:34:56 PST
The goal is to enable "JAVASCRIPT_DEBUGGER" in Chromium port and have profiler / debugger stuff compiled --- this requires not to depend directly on JSC, for example. As a first step, I'm removing custom implementations of Console, and migrating InspectorController towards using 'Script...' types instead of 'JSC::' ones. Temporarily, there will be stuff under "#if ENABLE(JAVASCRIPT_DEBUGGER) || USE(V8)" conditionals. The second part will be removed back after migration will have been finished, and thus JAVASCRIPT_DEBUGGER will be enabled in Chromium.
Attachments
proposed patch
(40.18 KB, patch)
2010-02-02 08:37 PST
,
Mikhail Naganov
no flags
Details
Formatted Diff
Diff
proposed patch - fixed style violations
(44.02 KB, patch)
2010-02-02 09:22 PST
,
Mikhail Naganov
pfeldman
: review-
Details
Formatted Diff
Diff
comments addressed, fixed style violations found by an updated version of style checking script
(48.48 KB, patch)
2010-02-03 01:25 PST
,
Mikhail Naganov
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Mikhail Naganov
Comment 1
2010-02-02 08:37:18 PST
Created
attachment 47935
[details]
proposed patch
WebKit Review Bot
Comment 2
2010-02-02 08:38:27 PST
Attachment 47935
[details]
did not pass style-queue: Failed to run "WebKitTools/Scripts/check-webkit-style" exit_code: 1 WebCore/page/Console.h:42: Code inside a namespace should not be indented. [whitespace/indent] [4] Skipping input 'WebCore/bindings/v8/custom/V8ConsoleCustom.cpp': Can't open for reading WebCore/bindings/js/ScriptProfiler.cpp:31: You should add a blank line after implementation file's own header. [build/include_order] [4] WebCore/bindings/v8/ScriptProfile.h:40: Place brace on its own line for function definitions. [whitespace/braces] [4] WebCore/bindings/v8/ScriptProfiler.cpp:32: You should add a blank line after implementation file's own header. [build/include_order] [4] WebCore/bindings/v8/ScriptProfiler.cpp:40: context_scope is incorrectly named. Don't use underscores in your identifier names. [readability/naming] [4] Total errors found: 5 If any of these errors are false positives, please file a bug against check-webkit-style.
Mikhail Naganov
Comment 3
2010-02-02 09:22:53 PST
Created
attachment 47941
[details]
proposed patch - fixed style violations
Pavel Feldman
Comment 4
2010-02-02 09:47:55 PST
Comment on
attachment 47941
[details]
proposed patch - fixed style violations r- for no comments on the migration scenario.
> + > + const String& title() const { return m_title; }
Return copy in order not to deal with the ownership.
> - JSC::StringBuilder message; > - message.append("Profile \"webkit-profile://"); > - message.append((UString)encodeWithURLEscapeSequences(CPUProfileType)); > - message.append("/"); > - message.append((UString)encodeWithURLEscapeSequences(profile->title())); > - message.append("#"); > - message.append(UString::from(profile->uid())); > - message.append("\" finished."); > - addMessageToConsole(JSMessageSource, LogMessageType, LogMessageLevel, message.release(), lineNumber, sourceURL); > + String message; > + message += "Profile \"webkit-profile://"; > + message += encodeWithURLEscapeSequences(CPUProfileType); > + message += "/"; > + message += encodeWithURLEscapeSequences(profile->title()); > + message += "#"; > + message += String::number(profile->uid()); > + message += "\" finished."; > + addMessageToConsole(JSMessageSource, LogMessageType, LogMessageLevel, message, lineNumber, sourceURL); > } >
Why not to use String::format?
> -void InspectorController::addStartProfilingMessageToConsole(const UString& title, unsigned lineNumber, const UString& sourceURL) > +void InspectorController::addStartProfilingMessageToConsole(const String& title, unsigned lineNumber, const String& sourceURL) > { > - JSC::StringBuilder message; > - message.append("Profile \"webkit-profile://"); > - message.append(encodeWithURLEscapeSequences(CPUProfileType)); > - message.append("/"); > - message.append(encodeWithURLEscapeSequences(title)); > - message.append("#0\" started."); > - addMessageToConsole(JSMessageSource, LogMessageType, LogMessageLevel, message.release(), lineNumber, sourceURL); > + String message; > + message += "Profile \"webkit-profile://"; > + message += encodeWithURLEscapeSequences(CPUProfileType); > + message += "/"; > + message += encodeWithURLEscapeSequences(title); > + message += "#0\" started."; > + addMessageToConsole(JSMessageSource, LogMessageType, LogMessageLevel, message, lineNumber, sourceURL); > } >
ditto
> +#if ENABLE(JAVASCRIPT_DEBUGGER) || USE(V8) >
> -#if ENABLE(INSPECTOR) > +#if ENABLE(INSPECTOR) && USE(JSC) > InspectorController* controller = page->inspectorController(); > // FIXME: log a console message when profiling is disabled.
> -#if ENABLE(INSPECTOR) > +#if ENABLE(INSPECTOR) && USE(JSC) > resolvedTitle = controller->getCurrentUserInitiatedProfileName(true); > #else
Could you comment on the fact that this is a temporary measure that will exist until JAVASCRIPT_DEBUGGER is enabled in V8 case?
Mikhail Naganov
Comment 5
2010-02-03 01:25:40 PST
Created
attachment 48003
[details]
comments addressed, fixed style violations found by an updated version of style checking script There can be an error from style checker concerning absence of `#include "config.h"' in JSBindingsAllInOne.cpp. I'm considering this as a problem in the style checker, not my fault.
WebKit Commit Bot
Comment 6
2010-02-03 02:54:34 PST
Comment on
attachment 48003
[details]
comments addressed, fixed style violations found by an updated version of style checking script Clearing flags on attachment: 48003 Committed
r54277
: <
http://trac.webkit.org/changeset/54277
>
WebKit Commit Bot
Comment 7
2010-02-03 02:54:44 PST
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug