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

Side by Side Diff: extensions/renderer/api_last_error.cc

Issue 2144093002: Adding checks for V8 functions returning Maybe<bool> (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Adding checks for V8 functions returning Maybe<bool> Created 3 years, 9 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 unified diff | Download patch
« no previous file with comments | « AUTHORS ('k') | extensions/renderer/module_system.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "extensions/renderer/api_last_error.h" 5 #include "extensions/renderer/api_last_error.h"
6 6
7 #include "gin/converter.h" 7 #include "gin/converter.h"
8 #include "gin/handle.h" 8 #include "gin/handle.h"
9 #include "gin/object_template_builder.h" 9 #include "gin/object_template_builder.h"
10 #include "gin/wrappable.h" 10 #include "gin/wrappable.h"
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 isolate->ThrowException( 136 isolate->ThrowException(
137 v8::Exception::Error(gin::StringToV8(isolate, last_error->error()))); 137 v8::Exception::Error(gin::StringToV8(isolate, last_error->error())));
138 } 138 }
139 139
140 // See comment in SetError(). 140 // See comment in SetError().
141 v8::TryCatch try_catch(isolate); 141 v8::TryCatch try_catch(isolate);
142 try_catch.SetVerbose(true); 142 try_catch.SetVerbose(true);
143 143
144 // This Delete() can fail, but there's nothing to do if it does (the exception 144 // This Delete() can fail, but there's nothing to do if it does (the exception
145 // will be caught by the TryCatch above). 145 // will be caught by the TryCatch above).
146 parent->Delete(context, key); 146 parent->Delete(context, key).ToChecked();
147 } 147 }
148 148
149 } // namespace extensions 149 } // namespace extensions
OLDNEW
« no previous file with comments | « AUTHORS ('k') | extensions/renderer/module_system.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698