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

Side by Side Diff: src/property.h

Issue 11362115: Object.observe: include oldValue in change records, (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments. Created 8 years, 1 month 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-inl.h ('k') | test/mjsunit/harmony/object-observe.js » ('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 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 Object* value; 283 Object* value;
284 value = holder()->property_dictionary()->ValueAt(GetDictionaryEntry()); 284 value = holder()->property_dictionary()->ValueAt(GetDictionaryEntry());
285 if (holder()->IsGlobalObject()) { 285 if (holder()->IsGlobalObject()) {
286 value = JSGlobalPropertyCell::cast(value)->value(); 286 value = JSGlobalPropertyCell::cast(value)->value();
287 } 287 }
288 return value; 288 return value;
289 } 289 }
290 case CONSTANT_FUNCTION: 290 case CONSTANT_FUNCTION:
291 return GetConstantFunction(); 291 return GetConstantFunction();
292 default: 292 default:
293 return Smi::FromInt(0); 293 return Isolate::Current()->heap()->the_hole_value();
294 } 294 }
295 } 295 }
296 296
297 Map* GetTransitionTarget() { 297 Map* GetTransitionTarget() {
298 ASSERT(IsTransition()); 298 ASSERT(IsTransition());
299 TransitionArray* transitions = holder()->map()->transitions(); 299 TransitionArray* transitions = holder()->map()->transitions();
300 return transitions->GetTarget(number_); 300 return transitions->GetTarget(number_);
301 } 301 }
302 302
303 PropertyDetails GetTransitionDetails(Map* map) { 303 PropertyDetails GetTransitionDetails(Map* map) {
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
408 JSReceiver* holder_; 408 JSReceiver* holder_;
409 int number_; 409 int number_;
410 bool cacheable_; 410 bool cacheable_;
411 PropertyDetails details_; 411 PropertyDetails details_;
412 }; 412 };
413 413
414 414
415 } } // namespace v8::internal 415 } } // namespace v8::internal
416 416
417 #endif // V8_PROPERTY_H_ 417 #endif // V8_PROPERTY_H_
OLDNEW
« no previous file with comments | « src/objects-inl.h ('k') | test/mjsunit/harmony/object-observe.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698