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

Side by Side Diff: src/accessors.cc

Issue 454001: Merge revisions r3372 - r3374 to trunk... (Closed) Base URL: http://v8.googlecode.com/svn/branches/1.3/
Patch Set: '' Created 11 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 | Annotate | Revision Log
« no previous file with comments | « include/v8.h ('k') | src/api.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 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 297 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 308
309 // 309 //
310 // Accessors::ScriptGetLineEnds 310 // Accessors::ScriptGetLineEnds
311 // 311 //
312 312
313 313
314 Object* Accessors::ScriptGetLineEnds(Object* object, void*) { 314 Object* Accessors::ScriptGetLineEnds(Object* object, void*) {
315 HandleScope scope; 315 HandleScope scope;
316 Handle<Script> script(Script::cast(JSValue::cast(object)->value())); 316 Handle<Script> script(Script::cast(JSValue::cast(object)->value()));
317 InitScriptLineEnds(script); 317 InitScriptLineEnds(script);
318 return script->line_ends(); 318 ASSERT(script->line_ends()->IsFixedArray());
319 Handle<FixedArray> line_ends(FixedArray::cast(script->line_ends()));
320 Handle<FixedArray> copy = Factory::CopyFixedArray(line_ends);
321 Handle<JSArray> js_array = Factory::NewJSArrayWithElements(copy);
322 return *js_array;
319 } 323 }
320 324
321 325
322 const AccessorDescriptor Accessors::ScriptLineEnds = { 326 const AccessorDescriptor Accessors::ScriptLineEnds = {
323 ScriptGetLineEnds, 327 ScriptGetLineEnds,
324 IllegalSetter, 328 IllegalSetter,
325 0 329 0
326 }; 330 };
327 331
328 332
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after
645 } 649 }
646 650
647 651
648 const AccessorDescriptor Accessors::ObjectPrototype = { 652 const AccessorDescriptor Accessors::ObjectPrototype = {
649 ObjectGetPrototype, 653 ObjectGetPrototype,
650 ObjectSetPrototype, 654 ObjectSetPrototype,
651 0 655 0
652 }; 656 };
653 657
654 } } // namespace v8::internal 658 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « include/v8.h ('k') | src/api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698