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

Side by Side Diff: src/contexts.h

Issue 261103002: filter out .caller from other worlds (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 7 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/api.cc ('k') | src/isolate.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_CONTEXTS_H_ 5 #ifndef V8_CONTEXTS_H_
6 #define V8_CONTEXTS_H_ 6 #define V8_CONTEXTS_H_
7 7
8 #include "heap.h" 8 #include "heap.h"
9 #include "objects.h" 9 #include "objects.h"
10 10
(...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after
442 } 442 }
443 bool IsModuleContext() { 443 bool IsModuleContext() {
444 Map* map = this->map(); 444 Map* map = this->map();
445 return map == map->GetHeap()->module_context_map(); 445 return map == map->GetHeap()->module_context_map();
446 } 446 }
447 bool IsGlobalContext() { 447 bool IsGlobalContext() {
448 Map* map = this->map(); 448 Map* map = this->map();
449 return map == map->GetHeap()->global_context_map(); 449 return map == map->GetHeap()->global_context_map();
450 } 450 }
451 451
452 bool HasSameSecurityTokenAs(Context* that) {
453 return this->global_object()->native_context()->security_token() ==
454 that->global_object()->native_context()->security_token();
455 }
456
452 // A native context holds a list of all functions with optimized code. 457 // A native context holds a list of all functions with optimized code.
453 void AddOptimizedFunction(JSFunction* function); 458 void AddOptimizedFunction(JSFunction* function);
454 void RemoveOptimizedFunction(JSFunction* function); 459 void RemoveOptimizedFunction(JSFunction* function);
455 void SetOptimizedFunctionsListHead(Object* head); 460 void SetOptimizedFunctionsListHead(Object* head);
456 Object* OptimizedFunctionsListHead(); 461 Object* OptimizedFunctionsListHead();
457 462
458 // The native context also stores a list of all optimized code and a 463 // The native context also stores a list of all optimized code and a
459 // list of all deoptimized code, which are needed by the deoptimizer. 464 // list of all deoptimized code, which are needed by the deoptimizer.
460 void AddOptimizedCode(Code* code); 465 void AddOptimizedCode(Code* code);
461 void SetOptimizedCodeListHead(Object* head); 466 void SetOptimizedCodeListHead(Object* head);
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
540 static bool IsBootstrappingOrGlobalObject(Isolate* isolate, Object* object); 545 static bool IsBootstrappingOrGlobalObject(Isolate* isolate, Object* object);
541 #endif 546 #endif
542 547
543 STATIC_CHECK(kHeaderSize == Internals::kContextHeaderSize); 548 STATIC_CHECK(kHeaderSize == Internals::kContextHeaderSize);
544 STATIC_CHECK(EMBEDDER_DATA_INDEX == Internals::kContextEmbedderDataIndex); 549 STATIC_CHECK(EMBEDDER_DATA_INDEX == Internals::kContextEmbedderDataIndex);
545 }; 550 };
546 551
547 } } // namespace v8::internal 552 } } // namespace v8::internal
548 553
549 #endif // V8_CONTEXTS_H_ 554 #endif // V8_CONTEXTS_H_
OLDNEW
« no previous file with comments | « src/api.cc ('k') | src/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698