summaryrefslogtreecommitdiff
path: root/deps/v8/src/factory.cc
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2010-10-30 11:13:37 -0700
committerRyan Dahl <ry@tinyclouds.org>2010-10-30 11:13:37 -0700
commit268bcbde7c62e7bc781c79c8b07ea067bd4b9b59 (patch)
tree968b595dd7df5e0ea7390b780c4883cbcb8ee8f3 /deps/v8/src/factory.cc
parentccdd979a690f5d0172f22b821f31672063629a31 (diff)
downloadnode-new-268bcbde7c62e7bc781c79c8b07ea067bd4b9b59.tar.gz
Upgrade V8 to 2.5.2
Diffstat (limited to 'deps/v8/src/factory.cc')
-rw-r--r--deps/v8/src/factory.cc30
1 files changed, 18 insertions, 12 deletions
diff --git a/deps/v8/src/factory.cc b/deps/v8/src/factory.cc
index 7c8c934044..a05ff6cc7e 100644
--- a/deps/v8/src/factory.cc
+++ b/deps/v8/src/factory.cc
@@ -431,7 +431,8 @@ Handle<Object> Factory::NewError(const char* maker,
const char* type,
Handle<JSArray> args) {
Handle<String> make_str = Factory::LookupAsciiSymbol(maker);
- Handle<Object> fun_obj(Top::builtins()->GetProperty(*make_str));
+ Handle<Object> fun_obj(Top::builtins()->GetPropertyNoExceptionThrown(
+ *make_str));
// If the builtins haven't been properly configured yet this error
// constructor may not have been defined. Bail out.
if (!fun_obj->IsJSFunction())
@@ -464,7 +465,7 @@ Handle<Object> Factory::NewError(const char* constructor,
Handle<JSFunction> fun =
Handle<JSFunction>(
JSFunction::cast(
- Top::builtins()->GetProperty(*constr)));
+ Top::builtins()->GetPropertyNoExceptionThrown(*constr)));
Object** argv[1] = { Handle<Object>::cast(message).location() };
// Invoke the JavaScript factory method. If an exception is thrown while
@@ -567,12 +568,13 @@ Handle<Code> Factory::CopyCode(Handle<Code> code, Vector<byte> reloc_info) {
}
-static inline Object* DoCopyInsert(DescriptorArray* array,
- String* key,
- Object* value,
- PropertyAttributes attributes) {
+MUST_USE_RESULT static inline MaybeObject* DoCopyInsert(
+ DescriptorArray* array,
+ String* key,
+ Object* value,
+ PropertyAttributes attributes) {
CallbacksDescriptor desc(key, value, attributes);
- Object* obj = array->CopyInsert(&desc, REMOVE_TRANSITIONS);
+ MaybeObject* obj = array->CopyInsert(&desc, REMOVE_TRANSITIONS);
return obj;
}
@@ -921,11 +923,15 @@ Handle<MapCache> Factory::NewMapCache(int at_least_space_for) {
}
-static Object* UpdateMapCacheWith(Context* context,
- FixedArray* keys,
- Map* map) {
- Object* result = MapCache::cast(context->map_cache())->Put(keys, map);
- if (!result->IsFailure()) context->set_map_cache(MapCache::cast(result));
+MUST_USE_RESULT static MaybeObject* UpdateMapCacheWith(Context* context,
+ FixedArray* keys,
+ Map* map) {
+ Object* result;
+ { MaybeObject* maybe_result =
+ MapCache::cast(context->map_cache())->Put(keys, map);
+ if (!maybe_result->ToObject(&result)) return maybe_result;
+ }
+ context->set_map_cache(MapCache::cast(result));
return result;
}