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

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

Issue 1492653004: [cleanup] Introduce PropertyFilter (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: windows ♥ Created 5 years 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/js/macros.py ('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 550 matching lines...) Expand 10 before | Expand all | Expand 10 after
561 EXCEPTION); 561 EXCEPTION);
562 } 562 }
563 Result result = SerializeProperty(property, comma, key); 563 Result result = SerializeProperty(property, comma, key);
564 if (!comma && result == SUCCESS) comma = true; 564 if (!comma && result == SUCCESS) comma = true;
565 if (result == EXCEPTION) return result; 565 if (result == EXCEPTION) return result;
566 } 566 }
567 } else { 567 } else {
568 Handle<FixedArray> contents; 568 Handle<FixedArray> contents;
569 ASSIGN_RETURN_ON_EXCEPTION_VALUE( 569 ASSIGN_RETURN_ON_EXCEPTION_VALUE(
570 isolate_, contents, 570 isolate_, contents,
571 JSReceiver::GetKeys(object, JSReceiver::OWN_ONLY), 571 JSReceiver::GetKeys(object, JSReceiver::OWN_ONLY, ENUMERABLE_STRINGS),
572 EXCEPTION); 572 EXCEPTION);
573 573
574 for (int i = 0; i < contents->length(); i++) { 574 for (int i = 0; i < contents->length(); i++) {
575 Object* key = contents->get(i); 575 Object* key = contents->get(i);
576 Handle<String> key_handle; 576 Handle<String> key_handle;
577 MaybeHandle<Object> maybe_property; 577 MaybeHandle<Object> maybe_property;
578 if (key->IsString()) { 578 if (key->IsString()) {
579 key_handle = Handle<String>(String::cast(key), isolate_); 579 key_handle = Handle<String>(String::cast(key), isolate_);
580 maybe_property = Object::GetPropertyOrElement(object, key_handle); 580 maybe_property = Object::GetPropertyOrElement(object, key_handle);
581 } else { 581 } else {
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
680 } else { 680 } else {
681 SerializeString_<uc16, uc16>(object); 681 SerializeString_<uc16, uc16>(object);
682 } 682 }
683 } 683 }
684 } 684 }
685 685
686 } // namespace internal 686 } // namespace internal
687 } // namespace v8 687 } // namespace v8
688 688
689 #endif // V8_JSON_STRINGIFIER_H_ 689 #endif // V8_JSON_STRINGIFIER_H_
OLDNEW
« no previous file with comments | « src/js/macros.py ('k') | src/key-accumulator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698