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

Side by Side Diff: src/string-stream.cc

Issue 17833002: Remove obsolete unchecked accessors in JSFunction. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 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 | Annotate | Revision Log
« no previous file with comments | « src/objects-visiting-inl.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 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 453 matching lines...) Expand 10 before | Expand all | Expand 10 after
464 } 464 }
465 Map* map = HeapObject::cast(f)->map(); 465 Map* map = HeapObject::cast(f)->map();
466 if (!map->IsHeapObject() || 466 if (!map->IsHeapObject() ||
467 !heap->Contains(map) || 467 !heap->Contains(map) ||
468 !map->IsMap() || 468 !map->IsMap() ||
469 !f->IsJSFunction()) { 469 !f->IsJSFunction()) {
470 return; 470 return;
471 } 471 }
472 472
473 JSFunction* fun = JSFunction::cast(f); 473 JSFunction* fun = JSFunction::cast(f);
474 Object* perhaps_context = fun->unchecked_context(); 474 Object* perhaps_context = fun->context();
475 if (perhaps_context->IsHeapObject() && 475 if (perhaps_context->IsHeapObject() &&
476 heap->Contains(HeapObject::cast(perhaps_context)) && 476 heap->Contains(HeapObject::cast(perhaps_context)) &&
477 perhaps_context->IsContext()) { 477 perhaps_context->IsContext()) {
478 Context* context = fun->context(); 478 Context* context = fun->context();
479 if (!heap->Contains(context)) { 479 if (!heap->Contains(context)) {
480 Add("(Function context is outside heap)\n"); 480 Add("(Function context is outside heap)\n");
481 return; 481 return;
482 } 482 }
483 Object* token = context->native_context()->security_token(); 483 Object* token = context->native_context()->security_token();
484 if (token != isolate->string_stream_current_security_token()) { 484 if (token != isolate->string_stream_current_security_token()) {
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
593 593
594 // Only grow once to the maximum allowable size. 594 // Only grow once to the maximum allowable size.
595 char* NoAllocationStringAllocator::grow(unsigned* bytes) { 595 char* NoAllocationStringAllocator::grow(unsigned* bytes) {
596 ASSERT(size_ >= *bytes); 596 ASSERT(size_ >= *bytes);
597 *bytes = size_; 597 *bytes = size_;
598 return space_; 598 return space_;
599 } 599 }
600 600
601 601
602 } } // namespace v8::internal 602 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/objects-visiting-inl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698