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

Side by Side Diff: src/json-stringifier.h

Issue 1668853002: [proxies] allow duplicate keys for [[OwnPropertyKeys]] trap. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: addressing nits Created 4 years, 10 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 | « src/debug/debug-scopes.cc ('k') | src/key-accumulator.h » ('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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project 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 #ifndef V8_JSON_STRINGIFIER_H_ 5 #ifndef V8_JSON_STRINGIFIER_H_
6 #define V8_JSON_STRINGIFIER_H_ 6 #define V8_JSON_STRINGIFIER_H_
7 7
8 #include "src/conversions.h" 8 #include "src/conversions.h"
9 #include "src/lookup.h" 9 #include "src/lookup.h"
10 #include "src/messages.h" 10 #include "src/messages.h"
(...skipping 549 matching lines...) Expand 10 before | Expand all | Expand 10 after
560 EXCEPTION); 560 EXCEPTION);
561 } 561 }
562 Result result = SerializeProperty(property, comma, key); 562 Result result = SerializeProperty(property, comma, key);
563 if (!comma && result == SUCCESS) comma = true; 563 if (!comma && result == SUCCESS) comma = true;
564 if (result == EXCEPTION) return result; 564 if (result == EXCEPTION) return result;
565 } 565 }
566 } else { 566 } else {
567 Handle<FixedArray> contents; 567 Handle<FixedArray> contents;
568 ASSIGN_RETURN_ON_EXCEPTION_VALUE( 568 ASSIGN_RETURN_ON_EXCEPTION_VALUE(
569 isolate_, contents, 569 isolate_, contents,
570 JSReceiver::GetKeys(object, JSReceiver::OWN_ONLY, ENUMERABLE_STRINGS), 570 JSReceiver::GetKeys(object, OWN_ONLY, ENUMERABLE_STRINGS), EXCEPTION);
571 EXCEPTION);
572 571
573 for (int i = 0; i < contents->length(); i++) { 572 for (int i = 0; i < contents->length(); i++) {
574 Object* key = contents->get(i); 573 Object* key = contents->get(i);
575 Handle<String> key_handle; 574 Handle<String> key_handle;
576 MaybeHandle<Object> maybe_property; 575 MaybeHandle<Object> maybe_property;
577 if (key->IsString()) { 576 if (key->IsString()) {
578 key_handle = Handle<String>(String::cast(key), isolate_); 577 key_handle = Handle<String>(String::cast(key), isolate_);
579 maybe_property = Object::GetPropertyOrElement(object, key_handle); 578 maybe_property = Object::GetPropertyOrElement(object, key_handle);
580 } else { 579 } else {
581 DCHECK(key->IsNumber()); 580 DCHECK(key->IsNumber());
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
679 } else { 678 } else {
680 SerializeString_<uc16, uc16>(object); 679 SerializeString_<uc16, uc16>(object);
681 } 680 }
682 } 681 }
683 } 682 }
684 683
685 } // namespace internal 684 } // namespace internal
686 } // namespace v8 685 } // namespace v8
687 686
688 #endif // V8_JSON_STRINGIFIER_H_ 687 #endif // V8_JSON_STRINGIFIER_H_
OLDNEW
« no previous file with comments | « src/debug/debug-scopes.cc ('k') | src/key-accumulator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698