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

Side by Side Diff: src/d8.cc

Issue 2806303002: [debug,api] Do not use embedder field for debug context id. (Closed)
Patch Set: restore enum Created 3 years, 8 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/contexts.h ('k') | src/debug/debug.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 #include <errno.h> 5 #include <errno.h>
6 #include <stdlib.h> 6 #include <stdlib.h>
7 #include <string.h> 7 #include <string.h>
8 #include <sys/stat.h> 8 #include <sys/stat.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 620 matching lines...) Expand 10 before | Expand all | Expand 10 after
631 : module_to_directory_map(10, ModuleGlobalHash(isolate)) {} 631 : module_to_directory_map(10, ModuleGlobalHash(isolate)) {}
632 632
633 // Map from normalized module specifier to Module. 633 // Map from normalized module specifier to Module.
634 std::unordered_map<std::string, Global<Module>> specifier_to_module_map; 634 std::unordered_map<std::string, Global<Module>> specifier_to_module_map;
635 // Map from Module to the directory that Module was loaded from. 635 // Map from Module to the directory that Module was loaded from.
636 std::unordered_map<Global<Module>, std::string, ModuleGlobalHash> 636 std::unordered_map<Global<Module>, std::string, ModuleGlobalHash>
637 module_to_directory_map; 637 module_to_directory_map;
638 }; 638 };
639 639
640 enum { 640 enum {
641 // The debugger reserves the first slot in the Context embedder data.
642 kDebugIdIndex = Context::kDebugIdIndex,
643 kModuleEmbedderDataIndex, 641 kModuleEmbedderDataIndex,
644 kInspectorClientIndex 642 kInspectorClientIndex
645 }; 643 };
646 644
647 void InitializeModuleEmbedderData(Local<Context> context) { 645 void InitializeModuleEmbedderData(Local<Context> context) {
648 context->SetAlignedPointerInEmbedderData( 646 context->SetAlignedPointerInEmbedderData(
649 kModuleEmbedderDataIndex, new ModuleEmbedderData(context->GetIsolate())); 647 kModuleEmbedderDataIndex, new ModuleEmbedderData(context->GetIsolate()));
650 } 648 }
651 649
652 ModuleEmbedderData* GetModuleDataFromContext(Local<Context> context) { 650 ModuleEmbedderData* GetModuleDataFromContext(Local<Context> context) {
(...skipping 2398 matching lines...) Expand 10 before | Expand all | Expand 10 after
3051 } 3049 }
3052 3050
3053 } // namespace v8 3051 } // namespace v8
3054 3052
3055 3053
3056 #ifndef GOOGLE3 3054 #ifndef GOOGLE3
3057 int main(int argc, char* argv[]) { 3055 int main(int argc, char* argv[]) {
3058 return v8::Shell::Main(argc, argv); 3056 return v8::Shell::Main(argc, argv);
3059 } 3057 }
3060 #endif 3058 #endif
OLDNEW
« no previous file with comments | « src/contexts.h ('k') | src/debug/debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698