Changeset 167569 in webkit
- Timestamp:
- Apr 20, 2014, 12:02:13 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 4 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/fast/forms/form-submission-crash-2-expected.txt (added)
-
LayoutTests/fast/forms/form-submission-crash-2.html (added)
-
LayoutTests/fast/forms/form-submission-crash-expected.txt (added)
-
LayoutTests/fast/forms/form-submission-crash.html (added)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/html/HTMLFormElement.cpp (modified) (2 diffs)
-
Source/WebCore/loader/FrameLoader.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r167568 r167569 1 2014-04-19 Alexey Proskuryakov <ap@apple.com> 2 3 Crashes in HTMLFormElement::submit. 4 https://bugs.webkit.org/show_bug.cgi?id=131910 5 <rdar://problem/15661790> 6 7 Reviewed by Anders Carlsson. 8 9 * fast/forms/form-submission-crash-2-expected.txt: Added. 10 * fast/forms/form-submission-crash-2.html: Added. 11 * fast/forms/form-submission-crash-expected.txt: Added. 12 * fast/forms/form-submission-crash.html: Added. 13 1 14 2014-04-20 Antti Koivisto <antti@apple.com> 2 15 -
trunk/Source/WebCore/ChangeLog
r167568 r167569 1 2014-04-19 Alexey Proskuryakov <ap@apple.com> 2 3 Crashes in HTMLFormElement::submit. 4 https://bugs.webkit.org/show_bug.cgi?id=131910 5 <rdar://problem/15661790> 6 7 Based on a patch by Kent Tamura. 8 9 Reviewed by Anders Carlsson. 10 11 Tests: fast/forms/form-submission-crash-2.html 12 fast/forms/form-submission-crash.html 13 14 Code that executes arbitrary JS needs to protect objects that it uses afterwards. 15 16 * html/HTMLFormElement.cpp: 17 (WebCore::HTMLFormElement::prepareForSubmission): 18 (WebCore::HTMLFormElement::submit): 19 * loader/FrameLoader.cpp: 20 (WebCore::FrameLoader::submitForm): 21 1 22 2014-04-20 Antti Koivisto <antti@apple.com> 2 23 -
trunk/Source/WebCore/html/HTMLFormElement.cpp
r166793 r167569 281 281 frame->loader().client().dispatchWillSendSubmitEvent(formState.release()); 282 282 283 Ref<HTMLFormElement> protect(*this); 283 284 // Event handling can result in m_shouldSubmit becoming true, regardless of dispatchEvent() return value. 284 285 if (dispatchEvent(Event::create(eventNames().submitEvent, true, true))) … … 353 354 354 355 LockHistory lockHistory = processingUserGesture ? LockHistory::No : LockHistory::Yes; 356 Ref<HTMLFormElement> protect(*this); // Form submission can execute arbitary JavaScript. 355 357 frame->loader().submitForm(FormSubmission::create(this, m_attributes, event, lockHistory, formSubmissionTrigger)); 356 358 -
trunk/Source/WebCore/loader/FrameLoader.cpp
r167523 r167569 379 379 return; 380 380 m_isExecutingJavaScriptFormAction = true; 381 Ref<Frame> protect(m_frame); 381 382 m_frame.script().executeIfJavaScriptURL(submission->action(), DoNotReplaceDocumentIfJavaScriptURL); 382 383 m_isExecutingJavaScriptFormAction = false;
Note:
See TracChangeset
for help on using the changeset viewer.