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

Unified Diff: src/bootstrapper.cc

Issue 3970005: Make Failure inherit from MaybeObject instead of Object. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 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/arm/stub-cache-arm.cc ('k') | src/builtins.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/bootstrapper.cc
===================================================================
--- src/bootstrapper.cc (revision 5696)
+++ src/bootstrapper.cc (working copy)
@@ -1009,11 +1009,10 @@
}
-#define INSTALL_NATIVE(Type, name, var) \
- Handle<String> var##_name = Factory::LookupAsciiSymbol(name); \
- global_context()->set_##var(Type::cast(global_context()-> \
- builtins()-> \
- GetProperty(*var##_name)));
+#define INSTALL_NATIVE(Type, name, var) \
+ Handle<String> var##_name = Factory::LookupAsciiSymbol(name); \
+ global_context()->set_##var(Type::cast( \
+ global_context()->builtins()->GetPropertyNoExceptionThrown(*var##_name)));
void Genesis::InstallNativeFunctions() {
HandleScope scope;
@@ -1369,7 +1368,8 @@
const char* function_name,
int id) {
Handle<String> name = Factory::LookupAsciiSymbol(function_name);
- Handle<JSFunction> function(JSFunction::cast(holder->GetProperty(*name)));
+ Object* function_object = holder->GetProperty(*name)->ToObjectUnchecked();
+ Handle<JSFunction> function(JSFunction::cast(function_object));
function->shared()->set_function_data(Smi::FromInt(id));
}
@@ -1584,8 +1584,9 @@
for (int i = 0; i < Builtins::NumberOfJavaScriptBuiltins(); i++) {
Builtins::JavaScript id = static_cast<Builtins::JavaScript>(i);
Handle<String> name = Factory::LookupAsciiSymbol(Builtins::GetName(id));
+ Object* function_object = builtins->GetPropertyNoExceptionThrown(*name);
Handle<JSFunction> function
- = Handle<JSFunction>(JSFunction::cast(builtins->GetProperty(*name)));
+ = Handle<JSFunction>(JSFunction::cast(function_object));
builtins->set_javascript_builtin(id, *function);
Handle<SharedFunctionInfo> shared
= Handle<SharedFunctionInfo>(function->shared());
« no previous file with comments | « src/arm/stub-cache-arm.cc ('k') | src/builtins.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698