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

Side by Side Diff: src/bootstrapper.h

Issue 1207003: Implement support for reattaching a global object to a context. This... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 years, 9 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/bootstrapper.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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 // Creates a JavaScript Global Context with initial object graph. 61 // Creates a JavaScript Global Context with initial object graph.
62 // The returned value is a global handle casted to V8Environment*. 62 // The returned value is a global handle casted to V8Environment*.
63 static Handle<Context> CreateEnvironment( 63 static Handle<Context> CreateEnvironment(
64 Handle<Object> global_object, 64 Handle<Object> global_object,
65 v8::Handle<v8::ObjectTemplate> global_template, 65 v8::Handle<v8::ObjectTemplate> global_template,
66 v8::ExtensionConfiguration* extensions); 66 v8::ExtensionConfiguration* extensions);
67 67
68 // Detach the environment from its outer global object. 68 // Detach the environment from its outer global object.
69 static void DetachGlobal(Handle<Context> env); 69 static void DetachGlobal(Handle<Context> env);
70 70
71 // Reattach an outer global object to an environment.
72 static void ReattachGlobal(Handle<Context> env, Handle<Object> global_object);
73
71 // Traverses the pointers for memory management. 74 // Traverses the pointers for memory management.
72 static void Iterate(ObjectVisitor* v); 75 static void Iterate(ObjectVisitor* v);
73 76
74 // Accessor for the native scripts source code. 77 // Accessor for the native scripts source code.
75 static Handle<String> NativesSourceLookup(int index); 78 static Handle<String> NativesSourceLookup(int index);
76 79
77 // Tells whether bootstrapping is active. 80 // Tells whether bootstrapping is active.
78 static bool IsActive() { return BootstrapperActive::IsActive(); } 81 static bool IsActive() { return BootstrapperActive::IsActive(); }
79 82
80 // Encoding/decoding support for fixup flags. 83 // Encoding/decoding support for fixup flags.
(...skipping 29 matching lines...) Expand all
110 return length_; 113 return length_;
111 } 114 }
112 private: 115 private:
113 const char* data_; 116 const char* data_;
114 size_t length_; 117 size_t length_;
115 }; 118 };
116 119
117 }} // namespace v8::internal 120 }} // namespace v8::internal
118 121
119 #endif // V8_BOOTSTRAPPER_H_ 122 #endif // V8_BOOTSTRAPPER_H_
OLDNEW
« no previous file with comments | « src/api.cc ('k') | src/bootstrapper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698