Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(145)

Issue 10532125: Merge 117928 - REGRESSION r110315: Event handler throws TypeError for an input element with name="a… (Closed)

Created:
8 years, 6 months ago by haraken
Modified:
8 years, 6 months ago
Reviewers:
haraken
CC:
chromium-reviews
Base URL:
http://svn.webkit.org/repository/webkit/branches/chromium/1132/
Visibility:
Public.

Description

Merge 117928 - REGRESSION r110315: Event handler throws TypeError for an input element with name="arguments" https://bugs.webkit.org/show_bug.cgi?id=86991 Reviewed by Ojan Vafai. Source/WebCore: Original Chromium bug: http://code.google.com/p/chromium/issues/detail?id=128723 Consider the following html: <html><body><form> <input type="hidden" name="arguments"></input> <div onclick="onclicked()" id="divInsideForm">Click here</div> </form></body> <script> function onclicked() { alert("onclicked"); } </script> </html> If we click "Click here", JavaScript throws "Uncaught TypeError: undefined has no properties". This is a regression caused by r110315. V8LazyEventListener should not use 'arguments' to retrieve the execution contexts, since 'arguments' can be shadowed by JavaScript. This patch changes V8LazyEventListener so that it retrieves contexts by this[2], this[1] and this[0]. Test: fast/forms/form-input-named-arguments.html * bindings/v8/V8LazyEventListener.cpp: (WebCore::V8LazyEventListener::prepareListenerObject): LayoutTests: The added test checks whether an event handler is successfully invoked for an input element with name="arguments". * fast/forms/form-input-named-arguments-expected.txt: Added. * fast/forms/form-input-named-arguments.html: Added. TBR=haraken@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=120197

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+9 lines, -4 lines) Patch
A + LayoutTests/fast/forms/form-input-named-arguments.html View 0 chunks +-1 lines, --1 lines 0 comments Download
A + LayoutTests/fast/forms/form-input-named-arguments-expected.txt View 0 chunks +-1 lines, --1 lines 0 comments Download
M LayoutTests/platform/chromium-win/inspector/debugger/debugger-scripts-expected.txt View 1 chunk +1 line, -1 line 0 comments Download
M Source/WebCore/bindings/v8/V8LazyEventListener.cpp View 2 chunks +10 lines, -5 lines 0 comments Download

Messages

Total messages: 1 (0 generated)
haraken
8 years, 6 months ago (2012-06-13 13:46:14 UTC) #1

          

Powered by Google App Engine
This is Rietveld 408576698