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

Unified Diff: ios/web/public/test/fakes/test_java_script_dialog_presenter.mm

Issue 2612423003: [ios] Fixed memory management bug in TestJavaScriptDialogPresenter. (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/web/public/test/fakes/test_java_script_dialog_presenter.mm
diff --git a/ios/web/public/test/fakes/test_java_script_dialog_presenter.mm b/ios/web/public/test/fakes/test_java_script_dialog_presenter.mm
index c0bb09f221c9d3c0d5b830e891fba1af67913148..2e44213214ba5c60c015893fa12fc6e03d199ed6 100644
--- a/ios/web/public/test/fakes/test_java_script_dialog_presenter.mm
+++ b/ios/web/public/test/fakes/test_java_script_dialog_presenter.mm
@@ -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);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698