Bug 129294 - [Inspector][EFL] Can't resume a special break point on EFL inspector
Summary: [Inspector][EFL] Can't resume a special break point on EFL inspector
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2014-02-25 01:42 PST by Gyuyoung Kim
Modified: 2014-06-23 00:54 PDT (History)
17 users (show)

See Also:


Attachments
Inspector.html (259 bytes, text/html)
2014-02-25 01:42 PST, Gyuyoung Kim
no flags Details
Inspector.js (497 bytes, application/javascript)
2014-02-25 01:43 PST, Gyuyoung Kim
no flags Details
Patch (6.47 KB, patch)
2014-03-26 02:21 PDT, SangYong Park
no flags Details | Formatted Diff | Diff
Patch (7.08 KB, patch)
2014-04-11 01:01 PDT, SangYong Park
ossy: review-
Details | Formatted Diff | Diff
Patch (9.92 KB, patch)
2014-06-17 09:22 PDT, Tibor Mészáros
no flags Details | Formatted Diff | Diff
Patch (6.14 KB, patch)
2014-06-17 09:34 PDT, Tibor Mészáros
no flags Details | Formatted Diff | Diff
Patch v3 (5.26 KB, patch)
2014-06-20 07:42 PDT, Tibor Mészáros
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Gyuyoung Kim 2014-02-25 01:42:21 PST
As mentioned in Bug 129247, the test page has some problems. One is a crash when enabling JIT, the other is that a break point is not resumed if a break point is set inside "addEventListener" when disabling JIT.

Reproduced steps :

1. Turn JIT off on EFL port. (Source/cmake/WebKitFeatures.cmake)
1. Tools/Script/build-webkit --efl --cmakeargs="-DSHARED_CORE=ON" --debug
2. WebKitBuild/Debug/bin/MiniBrowser ./inspector.html
3. Run inspector by using context menu after clicking mouse right button.
4. Set a break point in below line of inspector.js

    var textbox = document.querySelector('.contents');
    textbox.addEventListener("click", function(){
=>      box = document.querySelector('#textbox');
        box.innerHTML = box.innerHTML == "Basic" ? "Sample" : "Basic";
    });

5. Click "Basic" test on MiniBrowser.
6. The break point is cached.
7. Press "resume" button on inspector.
8. Looks look up.


According to my investigation until now, inspector can't receive "resume" event from Inspector frontend(UIProcess).
Comment 1 Radar WebKit Bug Importer 2014-02-25 01:42:46 PST
<rdar://problem/16158460>
Comment 2 Gyuyoung Kim 2014-02-25 01:42:50 PST
Created attachment 225131 [details]
Inspector.html
Comment 3 Gyuyoung Kim 2014-02-25 01:43:08 PST
Created attachment 225132 [details]
Inspector.js
Comment 4 Csaba Osztrogonác 2014-02-26 07:02:30 PST
After r164651, it can be reproducible with enabled/disabled JIT
in release/debug mode too.
Comment 5 Gyuyoung Kim 2014-02-26 18:50:28 PST
(In reply to comment #4)
> After r164651, it can be reproducible with enabled/disabled JIT
> in release/debug mode too.

According to current our investigation, this problem occurs when events should be processed as a nested loop in ecore_main_loop. Because the ecore_main_loop doesn't support a nested loop basically.

So, ecore_main_loop_iterate() can't process "continue" inspector button as soon as a js click event occurs.


*ecore_main_loop_iterate()*

"Runs a single iteration of the main loop to process everything on the queue.

It does everything that is already done inside an Ecore main loop, like checking for expired timers, idlers, etc. But it will do it only once and return, instead of keep watching for new events.

DO NOT use this function unless you are the person God comes to ask for advice when He has trouble managing the Universe."

http://docs.enlightenment.org/auto/emotion/group__Ecore__Main__Loop__Group.html#ga7f5463c1d4f3f020968ed06d6e5816cb
Comment 6 Csaba Osztrogonác 2014-03-10 14:07:31 PDT
Apple ran into similar bug - https://bugs.webkit.org/show_bug.cgi?id=130032
Comment 7 Timothy Hatcher 2014-03-12 11:45:25 PDT
That one was very specific to JSC debugging. We didn't have a similar issues in WebCore debugging.
Comment 8 SangYong Park 2014-03-26 02:21:30 PDT
Created attachment 227838 [details]
Patch
Comment 9 WebKit Commit Bot 2014-03-26 02:22:34 PDT
Attachment 227838 [details] did not pass style-queue:


ERROR: Source/WTF/wtf/efl/RunLoopEfl.cpp:112:  This { should be at the end of the previous line  [whitespace/braces] [4]
Total errors found: 1 in 6 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 10 Jinwoo Song 2014-03-27 22:01:20 PDT
Comment on attachment 227838 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=227838&action=review

> Source/WTF/ChangeLog:7
> +

You'd better to add description for this patch.
Comment 11 Gyuyoung Kim 2014-03-27 22:06:57 PDT
CC'ing Byungwoo.
Comment 12 SangYong Park 2014-04-11 01:01:59 PDT
Created attachment 229114 [details]
Patch
Comment 13 Ryuan Choi 2014-05-12 23:37:00 PDT
(In reply to comment #12)
> Created an attachment (id=229114) [details]
> Patch

How was it going?

I merged patch into EFL for this.
(https://phab.enlightenment.org/rEFL203006799186d47851509514786d05b4ae7fb644)

So, another option is adding patch at the ecore package of jhbuild.
Comment 14 Gyuyoung Kim 2014-05-14 21:07:24 PDT
(In reply to comment #13)
> (In reply to comment #12)
> > Created an attachment (id=229114) [details] [details]
> > Patch
> 
> How was it going?
> 
> I merged patch into EFL for this.
> (https://phab.enlightenment.org/rEFL203006799186d47851509514786d05b4ae7fb644)
> 
> So, another option is adding patch at the ecore package of jhbuild.

If we can solve this problem by using ecore's patch, I prefer to use it.
Comment 15 Tibor Mészáros 2014-06-17 09:22:07 PDT
Created attachment 233233 [details]
Patch

It's a patch, that based on SangYong Park's work.
Comment 16 Tibor Mészáros 2014-06-17 09:34:31 PDT
Created attachment 233234 [details]
Patch

The previously patch has been mistakenly uploaded, sorry about it. This will be the good one.
Comment 17 Gyuyoung Kim 2014-06-17 23:03:13 PDT
(In reply to comment #13)
> (In reply to comment #12)
> > Created an attachment (id=229114) [details] [details]
> > Patch
> 
> How was it going?
> 
> I merged patch into EFL for this.
> (https://phab.enlightenment.org/rEFL203006799186d47851509514786d05b4ae7fb644)
> 
> So, another option is adding patch at the ecore package of jhbuild.

Ryuan, I wonder if the EFL patch is already merged into efl 1.9. Could you check it ?
Comment 18 Ryuan Choi 2014-06-17 23:24:51 PDT
(In reply to comment #17)
> (In reply to comment #13)
> > (In reply to comment #12)
> > > Created an attachment (id=229114) [details] [details] [details]
> > > Patch
> > 
> > How was it going?
> > 
> > I merged patch into EFL for this.
> > (https://phab.enlightenment.org/rEFL203006799186d47851509514786d05b4ae7fb644)
> > 
> > So, another option is adding patch at the ecore package of jhbuild.
> 
> Ryuan, I wonder if the EFL patch is already merged into efl 1.9. Could you check it ?

No, it's not merged at 1.9 branch and 1.9 will not be released anymore.
It will be available from the 1.10.
FYI, latest version for 1.9.X is 1.9.5

So, what do you think about adding a patch in the jhbuild ?
Comment 19 Tibor Mészáros 2014-06-20 07:42:40 PDT
Created attachment 233427 [details]
Patch v3

I agree with Gyuyoung Kim, we can solve this problem by using ecore's patch. I had tested it, and it's working like a charm.
Comment 20 Gyuyoung Kim 2014-06-20 22:16:22 PDT
Comment on attachment 233427 [details]
Patch v3

LGTM. I prefer to use this approach to fix this problem.
Comment 21 Csaba Osztrogonác 2014-06-21 01:53:53 PDT
Comment on attachment 233427 [details]
Patch v3

Clearing flags on attachment: 233427

Committed r170236: <http://trac.webkit.org/changeset/170236>
Comment 22 Csaba Osztrogonác 2014-06-23 00:54:28 PDT
Comment on attachment 229114 [details]
Patch

Fixing EFL was preferred to workarounding WebKit.