OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |