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

Side by Side Diff: src/liveedit.h

Issue 1221303019: Fix keyed access of primitive objects in the runtime. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix Created 5 years, 5 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/ic/ic.cc ('k') | src/liveedit.cc » ('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_LIVEEDIT_H_ 5 #ifndef V8_LIVEEDIT_H_
6 #define V8_LIVEEDIT_H_ 6 #define V8_LIVEEDIT_H_
7 7
8 8
9 9
10 // Live Edit feature implementation. 10 // Live Edit feature implementation.
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 Handle<JSArray> GetJSArray() { 242 Handle<JSArray> GetJSArray() {
243 return array_; 243 return array_;
244 } 244 }
245 245
246 Isolate* isolate() const { 246 Isolate* isolate() const {
247 return array_->GetIsolate(); 247 return array_->GetIsolate();
248 } 248 }
249 249
250 protected: 250 protected:
251 void SetField(int field_position, Handle<Object> value) { 251 void SetField(int field_position, Handle<Object> value) {
252 JSObject::SetElement(array_, field_position, value, SLOPPY).Assert(); 252 Object::SetElement(isolate(), array_, field_position, value, SLOPPY)
253 .Assert();
253 } 254 }
254 255
255 void SetSmiValueField(int field_position, int value) { 256 void SetSmiValueField(int field_position, int value) {
256 SetField(field_position, Handle<Smi>(Smi::FromInt(value), isolate())); 257 SetField(field_position, Handle<Smi>(Smi::FromInt(value), isolate()));
257 } 258 }
258 259
259 Handle<Object> GetField(int field_position) { 260 Handle<Object> GetField(int field_position) {
260 return Object::GetElement( 261 return Object::GetElement(
261 isolate(), array_, field_position).ToHandleChecked(); 262 isolate(), array_, field_position).ToHandleChecked();
262 } 263 }
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
362 static const int kEndPositionOffset_ = 2; 363 static const int kEndPositionOffset_ = 2;
363 static const int kSharedInfoOffset_ = 3; 364 static const int kSharedInfoOffset_ = 3;
364 static const int kSize_ = 4; 365 static const int kSize_ = 4;
365 366
366 friend class JSArrayBasedStruct<SharedInfoWrapper>; 367 friend class JSArrayBasedStruct<SharedInfoWrapper>;
367 }; 368 };
368 369
369 } } // namespace v8::internal 370 } } // namespace v8::internal
370 371
371 #endif /* V*_LIVEEDIT_H_ */ 372 #endif /* V*_LIVEEDIT_H_ */
OLDNEW
« no previous file with comments | « src/ic/ic.cc ('k') | src/liveedit.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698