Bug 139663 - Web Inspector: Uncaught Exception when dismissing Go To Line dialog
Summary: Web Inspector: Uncaught Exception when dismissing Go To Line dialog
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2014-12-15 18:42 PST by Joseph Pecoraro
Modified: 2015-01-06 18:56 PST (History)
8 users (show)

See Also:


Attachments
[PATCH] Proposed Fix (2.10 KB, patch)
2014-12-15 18:44 PST, Joseph Pecoraro
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Joseph Pecoraro 2014-12-15 18:42:15 PST
* SUMMARY
Uncaught Exception when dismissing Go To Line dialog:

    [Error] NotFoundError: DOM Exception 8: An attempt was made to reference a Node in a context where it does not exist.
	removeChild (Main.js, line 6910)
	dismiss (Main.js, line 6910)
	_handleKeydownEvent (Main.js, line 6919)
	handleEvent (Main.js, line 6912)

* STEPS TO REPRODUCE
1. Inspect any page
2. Go to source code text editor
3. Open Go To Line Dialog (Cmd+L)
4. Input a number and push Return to dismiss the dialog
  => uncaught exception

* NOTES
- The exception is happening because dismiss is getting called twice. Once by the key event, once by the "blur" event that is happening as the result of removeChild. This double dismiss causes an exception.
Comment 1 Joseph Pecoraro 2014-12-15 18:44:44 PST
Created attachment 243335 [details]
[PATCH] Proposed Fix
Comment 2 Joseph Pecoraro 2014-12-15 18:45:31 PST
Example debugging:

    Resources/Views/GoToLineDialog.js:70:20: CONSOLE LOG dismissing
    Resources/Views/GoToLineDialog.js:71:22: CONSOLE TRACE
    0: dismiss(Resources/Views/GoToLineDialog.js:71:22)
    1: _handleKeydownEvent(Resources/Views/GoToLineDialog.js:138:29)
    2: handleEvent(Resources/Views/GoToLineDialog.js:98:37)

    Resources/Views/GoToLineDialog.js:70:20: CONSOLE LOG dismissing
    Resources/Views/GoToLineDialog.js:71:22: CONSOLE TRACE
    0: dismiss(Resources/Views/GoToLineDialog.js:71:22)
    1: _handleBlurEvent(Resources/Views/GoToLineDialog.js:149:21)
    2: handleEvent(Resources/Views/GoToLineDialog.js:101:34)
    3: removeChild([native code])
    4: dismiss(Resources/Views/GoToLineDialog.js:81:27)
    5: _handleKeydownEvent(Resources/Views/GoToLineDialog.js:138:29)
    6: handleEvent(Resources/Views/GoToLineDialog.js:98:37)

Shows the nested nature.
Comment 3 Radar WebKit Bug Importer 2014-12-17 11:23:39 PST
<rdar://problem/19281546>
Comment 4 WebKit Commit Bot 2015-01-06 18:56:55 PST
Comment on attachment 243335 [details]
[PATCH] Proposed Fix

Clearing flags on attachment: 243335

Committed r178018: <http://trac.webkit.org/changeset/178018>
Comment 5 WebKit Commit Bot 2015-01-06 18:56:59 PST
All reviewed patches have been landed.  Closing bug.