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/objects.cc

Issue 494733005: Change return-type of SetDataProperty to Handle. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/objects.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/accessors.h" 7 #include "src/accessors.h"
8 #include "src/allocation-site-scopes.h" 8 #include "src/allocation-site-scopes.h"
9 #include "src/api.h" 9 #include "src/api.h"
10 #include "src/arguments.h" 10 #include "src/arguments.h"
(...skipping 2914 matching lines...) Expand 10 before | Expand all | Expand 10 after
2925 StrictMode strict_mode) { 2925 StrictMode strict_mode) {
2926 if (strict_mode != STRICT) return value; 2926 if (strict_mode != STRICT) return value;
2927 2927
2928 Handle<Object> args[] = {it->name(), it->GetReceiver()}; 2928 Handle<Object> args[] = {it->name(), it->GetReceiver()};
2929 Handle<Object> error = it->factory()->NewTypeError( 2929 Handle<Object> error = it->factory()->NewTypeError(
2930 "strict_read_only_property", HandleVector(args, ARRAY_SIZE(args))); 2930 "strict_read_only_property", HandleVector(args, ARRAY_SIZE(args)));
2931 return it->isolate()->Throw<Object>(error); 2931 return it->isolate()->Throw<Object>(error);
2932 } 2932 }
2933 2933
2934 2934
2935 MaybeHandle<Object> Object::SetDataProperty(LookupIterator* it, 2935 Handle<Object> Object::SetDataProperty(LookupIterator* it,
2936 Handle<Object> value) { 2936 Handle<Object> value) {
2937 // Proxies are handled on the WithHandler path. Other non-JSObjects cannot 2937 // Proxies are handled on the WithHandler path. Other non-JSObjects cannot
2938 // have own properties. 2938 // have own properties.
2939 Handle<JSObject> receiver = Handle<JSObject>::cast(it->GetReceiver()); 2939 Handle<JSObject> receiver = Handle<JSObject>::cast(it->GetReceiver());
2940 2940
2941 // Store on the holder which may be hidden behind the receiver. 2941 // Store on the holder which may be hidden behind the receiver.
2942 DCHECK(it->HolderIsReceiverOrHiddenPrototype()); 2942 DCHECK(it->HolderIsReceiverOrHiddenPrototype());
2943 2943
2944 // Old value for the observation change record. 2944 // Old value for the observation change record.
2945 // Fetch before transforming the object since the encoding may become 2945 // Fetch before transforming the object since the encoding may become
2946 // incompatible with what's cached in |it|. 2946 // incompatible with what's cached in |it|.
(...skipping 13525 matching lines...) Expand 10 before | Expand all | Expand 10 after
16472 #define ERROR_MESSAGES_TEXTS(C, T) T, 16472 #define ERROR_MESSAGES_TEXTS(C, T) T,
16473 static const char* error_messages_[] = { 16473 static const char* error_messages_[] = {
16474 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) 16474 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS)
16475 }; 16475 };
16476 #undef ERROR_MESSAGES_TEXTS 16476 #undef ERROR_MESSAGES_TEXTS
16477 return error_messages_[reason]; 16477 return error_messages_[reason];
16478 } 16478 }
16479 16479
16480 16480
16481 } } // namespace v8::internal 16481 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/objects.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698