WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
43332
[JSC] Web Inspector: implement breaking from native callback
https://bugs.webkit.org/show_bug.cgi?id=43332
Summary
[JSC] Web Inspector: implement breaking from native callback
Pavel Podivilov
Reported
2010-08-02 02:18:42 PDT
It should be possible to break javascript execution from a native callback.
Attachments
Patch
(2.40 KB, patch)
2012-05-31 03:01 PDT
,
Peter Wang
no flags
Details
Formatted Diff
Diff
Patch
(2.42 KB, patch)
2012-05-31 03:10 PDT
,
Peter Wang
no flags
Details
Formatted Diff
Diff
Patch
(4.85 KB, patch)
2012-06-04 02:51 PDT
,
Peter Wang
no flags
Details
Formatted Diff
Diff
Archive of layout-test-results from ec2-cr-linux-02
(601.01 KB, application/zip)
2012-06-04 07:22 PDT
,
WebKit Review Bot
no flags
Details
Patch
(3.34 KB, patch)
2012-06-04 21:09 PDT
,
Peter Wang
no flags
Details
Formatted Diff
Diff
Patch
(3.33 KB, patch)
2012-06-11 00:08 PDT
,
Peter Wang
no flags
Details
Formatted Diff
Diff
Show Obsolete
(4)
View All
Add attachment
proposed patch, testcase, etc.
Pavel Feldman
Comment 1
2010-08-25 10:37:00 PDT
JSC's ScriptDebugServer::breakProgram() needs implementation.
Joseph Pecoraro
Comment 2
2010-08-25 10:40:46 PDT
The original bug for DOM Breakpoints was:
https://bugs.webkit.org/show_bug.cgi?id=42886
Joseph Pecoraro
Comment 3
2010-08-25 11:06:23 PDT
"This method should emulate stopping on a breakpoint, run the message loop and deliver backtrace to the front-end. Basically repeat the original breakpoint loop routine."
Timothy Hatcher
Comment 4
2010-09-27 10:59:54 PDT
How is this used in the Inspector? (So the people implementing it can test it.)
Pavel Feldman
Comment 5
2010-09-27 11:25:48 PDT
(In reply to
comment #4
)
> How is this used in the Inspector? (So the people implementing it can test it.)
1. In Settings.js set Preferences.nativeInstrumentationEnabled = true (currently is false). 2. In Elements panel, invoke context menu on some node and enable DOM breakpoints. 3. Do something that makes events fire Expected: JS is stopped, Scripts panel shown, stack shows JS stack that led to the DOM mutation.
Peter Wang
Comment 6
2012-05-31 03:01:37 PDT
Created
attachment 145036
[details]
Patch
WebKit Review Bot
Comment 7
2012-05-31 03:04:30 PDT
Attachment 145036
[details]
did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCor..." exit_code: 1 Source/WebCore/ChangeLog:10: You should remove the 'No new tests' and either add and list tests, or explain why no new tests were possible. [changelog/nonewtests] [5] Total errors found: 1 in 3 files If any of these errors are false positives, please file a bug against check-webkit-style.
Peter Wang
Comment 8
2012-05-31 03:10:30 PDT
Created
attachment 145039
[details]
Patch
Yury Semikhatsky
Comment 9
2012-05-31 05:03:02 PDT
Comment on
attachment 145039
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=145039&action=review
> Source/WebCore/ChangeLog:10 > + No test. No impact on others interface of JSC.
There is a bunch of layout tests in LayouTests/inspector/debugger disabled for JSC because of this bug. You should enable them if the functionality is now fixed.
> Source/WebCore/bindings/js/ScriptDebugServer.cpp:158 > + m_paused = true;
This is not what we expect this method to do, you should run message loop here until the execution is resumed like in case if a regular JS breakpoint. Probably the following code will work: m_pauseOnNextStatement = true; pauseIfNeeded(m_currentCallFrame->dynamicGlobalObject());
> Source/WebCore/bindings/js/ScriptDebugServer.h:88 > + bool supportsNativeBreakpoints() { return true; }
This method now can be removed from both Source/WebCore/bindings/{js,v8}/ScriptDebugServer.h as it returns the same value.
Peter Wang
Comment 10
2012-06-04 02:51:55 PDT
Created
attachment 145547
[details]
Patch
Konrad Piascik
Comment 11
2012-06-04 05:59:37 PDT
Comment on
attachment 145547
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=145547&action=review
> Source/WebCore/bindings/js/ScriptDebugServer.cpp:155 > + if (isPaused() || !m_currentCallFrame)
please use m_paused like the rest of the class instead of isPaused()
> Source/WebCore/inspector/InspectorDebuggerAgent.cpp:121 > void InspectorDebuggerAgent::supportsNativeBreakpoints(ErrorString*, bool* result)
can we not get rid of this method alltogether? Is it used for something else?
Pavel Feldman
Comment 12
2012-06-04 06:27:03 PDT
Comment on
attachment 145547
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=145547&action=review
>> Source/WebCore/inspector/InspectorDebuggerAgent.cpp:121 >> void InspectorDebuggerAgent::supportsNativeBreakpoints(ErrorString*, bool* result) > > can we not get rid of this method alltogether? Is it used for something else?
Now that we consider it supported by all ports, it should go away along with its declaration in the protocol (Inspector.json) and its usage in the front-end. Make sure inspector people take a look at this change prior to landing once all the usages are removed.
WebKit Review Bot
Comment 13
2012-06-04 07:22:16 PDT
Comment on
attachment 145547
[details]
Patch
Attachment 145547
[details]
did not pass chromium-ews (chromium-xvfb): Output:
http://queues.webkit.org/results/12900220
New failing tests: http/tests/media/media-source/video-media-source-event-attributes.html
WebKit Review Bot
Comment 14
2012-06-04 07:22:21 PDT
Created
attachment 145583
[details]
Archive of layout-test-results from ec2-cr-linux-02 The attached test failures were seen while running run-webkit-tests on the chromium-ews. Bot: ec2-cr-linux-02 Port: <class 'webkitpy.common.config.ports.ChromiumXVFBPort'> Platform: Linux-2.6.35-28-virtual-x86_64-with-Ubuntu-10.10-maverick
Pavel Feldman
Comment 15
2012-06-04 12:47:55 PDT
Comment on
attachment 145547
[details]
Patch r- per comments above
Peter Wang
Comment 16
2012-06-04 21:09:49 PDT
Created
attachment 145688
[details]
Patch
Peter Wang
Comment 17
2012-06-04 21:30:04 PDT
Yury, Konrad, and Pavel, can we do it by two steps? Firstly, make sure things of JSC Ok in this bug. Secondly, open a new bug to remove the common code in v8 and inspector.
Pavel Feldman
Comment 18
2012-06-09 03:55:01 PDT
(In reply to
comment #17
)
> Yury, Konrad, and Pavel, can we do it by two steps? > Firstly, make sure things of JSC Ok in this bug. Secondly, open a new bug to remove the common code in v8 and inspector.
Sounds good to me, just make sure you file the new bug first and refer to it from the change via // FIXME: <bug link> Remove this method.
Pavel Feldman
Comment 19
2012-06-09 03:55:38 PDT
Comment on
attachment 145688
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=145688&action=review
> Source/WebCore/bindings/js/ScriptDebugServer.h:88 > + bool supportsNativeBreakpoints() { return true; }
Please put fixme here.
Peter Wang
Comment 20
2012-06-11 00:08:46 PDT
Created
attachment 146796
[details]
Patch
WebKit Review Bot
Comment 21
2012-06-11 01:24:22 PDT
Comment on
attachment 146796
[details]
Patch Clearing flags on attachment: 146796 Committed
r119962
: <
http://trac.webkit.org/changeset/119962
>
WebKit Review Bot
Comment 22
2012-06-11 01:24:29 PDT
All reviewed patches have been landed. Closing bug.
Csaba Osztrogonác
Comment 23
2012-06-11 03:34:05 PDT
These tests still fail on Qt:
http://build.webkit.sed.hu/results/x86-64%20Linux%20Qt%20Release/r119968%20%2838549%29/results.html
Csaba Osztrogonác
Comment 24
2012-06-11 06:54:15 PDT
(In reply to
comment #23
)
> These tests still fail on Qt: >
http://build.webkit.sed.hu/results/x86-64%20Linux%20Qt%20Release/r119968%20%2838549%29/results.html
I made a little digging. This patch only enabled this tests on Qt, they are still skipped on other platforms: - wincairo/Skipped - mac/Skipped - win/Skipped - gtk/TestExpectations (but here all inspector tests are skipped because of an another bug) inspector/debugger/dom-breakpoints.html ----------------------------------------
http://build.webkit.sed.hu/results/x86-64%20Linux%20Qt%20Release/r119973%20%2838553%29/inspector/debugger/dom-breakpoints-pretty-diff.html
The results seems correct, but the platform independent (JSC specific expected file wasn't updated long time ago, only the chromium specific) inspector/debugger/event-listener-breakpoints.html ---------------------------------------------------
http://build.webkit.sed.hu/results/x86-64%20Linux%20Qt%20Release/r119973%20%2838553%29/inspector/debugger/event-listener-breakpoints-pretty-diff.html
It seems correct, but we need JSC and V8 specific expected files. inspector/debugger/step-through-event-listeners.html -----------------------------------------------------
http://build.webkit.sed.hu/results/x86-64%20Linux%20Qt%20Release/r119973%20%2838553%29/inspector/debugger/step-through-event-listeners-pretty-diff.html
It seems correct, but we need JSC and V8 specific expected files. inspector/debugger/xhr-breakpoints.html ----------------------------------------
http://build.webkit.sed.hu/results/x86-64%20Linux%20Qt%20Release/r119973%20%2838553%29/inspector/debugger/xhr-breakpoints-pretty-diff.html
It is absolutely wrong on Qt.
Csaba Osztrogonác
Comment 25
2012-06-11 07:00:00 PDT
I filed a new bug report to track the failures (because I don't want to confuse anybody with discussing in this bug)-
https://bugs.webkit.org/show_bug.cgi?id=88780
Peter Wang
Comment 26
2012-06-11 18:14:47 PDT
(In reply to
comment #25
)
> I filed a new bug report to track the failures (because I don't want to confuse anybody with discussing in this bug)-
https://bugs.webkit.org/show_bug.cgi?id=88780
I've investigated the test cases, it's just because expectation file is old. I'll resolve
https://bugs.webkit.org/show_bug.cgi?id=88780
as soon as possible.
Yury Semikhatsky
Comment 27
2012-12-28 06:59:52 PST
Now that this bug is resolved we should unskip some of the tests that used to fail because of it, see for example: #
https://bugs.webkit.org/show_bug.cgi?id=43332
inspector/debugger/dom-breakpoints.html inspector/debugger/event-listener-breakpoints.html inspector/debugger/step-through-event-listeners.html inspector/debugger/xhr-breakpoints.html
http://trac.webkit.org/browser/trunk/LayoutTests/platform/qt/TestExpectations#L247
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