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

Unified Diff: src/objects.cc

Issue 2208683002: Fix a double-throw in JSReceiver::DefineProperties (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 4 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: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index 94b57afb85ac00d7ccbd90dc8b82eea9fbbdf311..009c5f5cece25ebe699e711bf0cb71c4c1bc27be 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -6402,11 +6402,9 @@ MaybeHandle<Object> JSReceiver::DefineProperties(Isolate* isolate,
// 2. Let props be ToObject(Properties).
// 3. ReturnIfAbrupt(props).
Handle<JSReceiver> props;
- if (!Object::ToObject(isolate, properties).ToHandle(&props)) {
- THROW_NEW_ERROR(isolate,
- NewTypeError(MessageTemplate::kUndefinedOrNullToObject),
- Object);
- }
+ ASSIGN_RETURN_ON_EXCEPTION(isolate, props,
+ Object::ToObject(isolate, properties), Object);
+
// 4. Let keys be props.[[OwnPropertyKeys]]().
// 5. ReturnIfAbrupt(keys).
Handle<FixedArray> keys;
« 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