Commit 1d41c27d authored by eugenebut's avatar eugenebut Committed by Commit bot

[ios] Fixed memory management bug in TestJavaScriptDialogPresenter.

Copy strings before passing them to scoped_nsobjects.

BUG=679032

Review-Url: https://codereview.chromium.org/2612423003
Cr-Commit-Position: refs/heads/master@{#442093}
parent c70beeaf
......@@ -28,8 +28,8 @@ void TestJavaScriptDialogPresenter::RunJavaScriptDialog(
dialog.web_state = web_state;
dialog.origin_url = origin_url;
dialog.java_script_dialog_type = java_script_dialog_type;
dialog.message_text.reset(message_text);
dialog.default_prompt_text.reset(default_prompt_text);
dialog.message_text.reset([message_text copy]);
dialog.default_prompt_text.reset([default_prompt_text copy]);
requested_dialogs_.push_back(dialog);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment