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

Unified Diff: src/factory.cc

Issue 7366: Split window support from V8. ... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 12 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/factory.h ('k') | src/handles.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/factory.cc
===================================================================
--- src/factory.cc (revision 539)
+++ src/factory.cc (working copy)
@@ -312,7 +312,7 @@
Handle<JSFunction> fun =
Handle<JSFunction>(
JSFunction::cast(
- Top::security_context_builtins()->GetProperty(*make_str)));
+ Top::builtins()->GetProperty(*make_str)));
Handle<Object> type_obj = Factory::LookupAsciiSymbol(type);
Object** argv[2] = { type_obj.location(),
Handle<Object>::cast(args).location() };
@@ -321,7 +321,7 @@
// running the factory method, use the exception as the result.
bool caught_exception;
Handle<Object> result = Execution::TryCall(fun,
- Top::security_context_builtins(),
+ Top::builtins(),
2,
argv,
&caught_exception);
@@ -340,14 +340,14 @@
Handle<JSFunction> fun =
Handle<JSFunction>(
JSFunction::cast(
- Top::security_context_builtins()->GetProperty(*constr)));
+ Top::builtins()->GetProperty(*constr)));
Object** argv[1] = { Handle<Object>::cast(message).location() };
// Invoke the JavaScript factory method. If an exception is thrown while
// running the factory method, use the exception as the result.
bool caught_exception;
Handle<Object> result = Execution::TryCall(fun,
- Top::security_context_builtins(),
+ Top::builtins(),
1,
argv,
&caught_exception);
@@ -670,8 +670,7 @@
Handle<JSFunction> Factory::CreateApiFunction(
- Handle<FunctionTemplateInfo> obj,
- bool is_global) {
+ Handle<FunctionTemplateInfo> obj, ApiInstanceType instance_type) {
Handle<Code> code = Handle<Code>(Builtins::builtin(Builtins::HandleApiCall));
int internal_field_count = 0;
@@ -684,14 +683,25 @@
}
int instance_size = kPointerSize * internal_field_count;
- if (is_global) {
- instance_size += JSGlobalObject::kSize;
- } else {
- instance_size += JSObject::kHeaderSize;
+ InstanceType type;
+ switch (instance_type) {
+ case JavaScriptObject:
+ type = JS_OBJECT_TYPE;
+ instance_size += JSObject::kHeaderSize;
+ break;
+ case InnerGlobalObject:
+ type = JS_GLOBAL_OBJECT_TYPE;
+ instance_size += JSGlobalObject::kSize;
+ break;
+ case OuterGlobalObject:
+ type = JS_GLOBAL_PROXY_TYPE;
+ instance_size += JSGlobalProxy::kSize;
+ break;
+ default:
+ ASSERT(false);
+ break;
}
- InstanceType type = is_global ? JS_GLOBAL_OBJECT_TYPE : JS_OBJECT_TYPE;
-
Handle<JSFunction> result =
Factory::NewFunction(Factory::empty_symbol(), type, instance_size,
code, true);
@@ -716,7 +726,7 @@
// Mark as needs_access_check if needed.
if (obj->needs_access_check()) {
- map->set_needs_access_check();
+ map->set_is_access_check_needed();
}
// Set interceptor information in the map.
« no previous file with comments | « src/factory.h ('k') | src/handles.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698