From: erik.corry@gmail.com Date: Mon, 25 Oct 2010 15:22:03 +0000 (+0000) Subject: Make Failure inherit from MaybeObject instead of Object. X-Git-Tag: upstream/4.7.83~21040 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0dcaac1939f2f017a7b33015443efc9cef2f845f;p=platform%2Fupstream%2Fv8.git Make Failure inherit from MaybeObject instead of Object. Review URL: http://codereview.chromium.org/3970005 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5698 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- diff --git a/src/accessors.cc b/src/accessors.cc index 3c49846..7c21659 100644 --- a/src/accessors.cc +++ b/src/accessors.cc @@ -50,7 +50,7 @@ static C* FindInPrototypeChain(Object* obj, bool* found_it) { // Entry point that never should be called. -Object* Accessors::IllegalSetter(JSObject*, Object*, void*) { +MaybeObject* Accessors::IllegalSetter(JSObject*, Object*, void*) { UNREACHABLE(); return NULL; } @@ -62,7 +62,7 @@ Object* Accessors::IllegalGetAccessor(Object* object, void*) { } -Object* Accessors::ReadOnlySetAccessor(JSObject*, Object* value, void*) { +MaybeObject* Accessors::ReadOnlySetAccessor(JSObject*, Object* value, void*) { // According to ECMA-262, section 8.6.2.2, page 28, setting // read-only properties must be silently ignored. return value; @@ -74,7 +74,7 @@ Object* Accessors::ReadOnlySetAccessor(JSObject*, Object* value, void*) { // -Object* Accessors::ArrayGetLength(Object* object, void*) { +MaybeObject* Accessors::ArrayGetLength(Object* object, void*) { // Traverse the prototype chain until we reach an array. bool found_it = false; JSArray* holder = FindInPrototypeChain(object, &found_it); @@ -96,7 +96,7 @@ Object* Accessors::FlattenNumber(Object* value) { } -Object* Accessors::ArraySetLength(JSObject* object, Object* value, void*) { +MaybeObject* Accessors::ArraySetLength(JSObject* object, Object* value, void*) { value = FlattenNumber(value); // Need to call methods that may trigger GC. @@ -144,7 +144,7 @@ const AccessorDescriptor Accessors::ArrayLength = { // -Object* Accessors::StringGetLength(Object* object, void*) { +MaybeObject* Accessors::StringGetLength(Object* object, void*) { Object* value = object; if (object->IsJSValue()) value = JSValue::cast(object)->value(); if (value->IsString()) return Smi::FromInt(String::cast(value)->length()); @@ -166,7 +166,7 @@ const AccessorDescriptor Accessors::StringLength = { // -Object* Accessors::ScriptGetSource(Object* object, void*) { +MaybeObject* Accessors::ScriptGetSource(Object* object, void*) { Object* script = JSValue::cast(object)->value(); return Script::cast(script)->source(); } @@ -184,7 +184,7 @@ const AccessorDescriptor Accessors::ScriptSource = { // -Object* Accessors::ScriptGetName(Object* object, void*) { +MaybeObject* Accessors::ScriptGetName(Object* object, void*) { Object* script = JSValue::cast(object)->value(); return Script::cast(script)->name(); } @@ -202,7 +202,7 @@ const AccessorDescriptor Accessors::ScriptName = { // -Object* Accessors::ScriptGetId(Object* object, void*) { +MaybeObject* Accessors::ScriptGetId(Object* object, void*) { Object* script = JSValue::cast(object)->value(); return Script::cast(script)->id(); } @@ -220,7 +220,7 @@ const AccessorDescriptor Accessors::ScriptId = { // -Object* Accessors::ScriptGetLineOffset(Object* object, void*) { +MaybeObject* Accessors::ScriptGetLineOffset(Object* object, void*) { Object* script = JSValue::cast(object)->value(); return Script::cast(script)->line_offset(); } @@ -238,7 +238,7 @@ const AccessorDescriptor Accessors::ScriptLineOffset = { // -Object* Accessors::ScriptGetColumnOffset(Object* object, void*) { +MaybeObject* Accessors::ScriptGetColumnOffset(Object* object, void*) { Object* script = JSValue::cast(object)->value(); return Script::cast(script)->column_offset(); } @@ -256,7 +256,7 @@ const AccessorDescriptor Accessors::ScriptColumnOffset = { // -Object* Accessors::ScriptGetData(Object* object, void*) { +MaybeObject* Accessors::ScriptGetData(Object* object, void*) { Object* script = JSValue::cast(object)->value(); return Script::cast(script)->data(); } @@ -274,7 +274,7 @@ const AccessorDescriptor Accessors::ScriptData = { // -Object* Accessors::ScriptGetType(Object* object, void*) { +MaybeObject* Accessors::ScriptGetType(Object* object, void*) { Object* script = JSValue::cast(object)->value(); return Script::cast(script)->type(); } @@ -292,7 +292,7 @@ const AccessorDescriptor Accessors::ScriptType = { // -Object* Accessors::ScriptGetCompilationType(Object* object, void*) { +MaybeObject* Accessors::ScriptGetCompilationType(Object* object, void*) { Object* script = JSValue::cast(object)->value(); return Script::cast(script)->compilation_type(); } @@ -310,7 +310,7 @@ const AccessorDescriptor Accessors::ScriptCompilationType = { // -Object* Accessors::ScriptGetLineEnds(Object* object, void*) { +MaybeObject* Accessors::ScriptGetLineEnds(Object* object, void*) { HandleScope scope; Handle