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

Side by Side Diff: src/runtime.cc

Issue 251683003: Fix CurrentMapForDeprecated() to return MaybeHandle instead of a null handle. (Closed) Base URL: git@github.com:v8/v8.git@master
Patch Set: Mark functions that return MaybeHandle with V8_WARN_UNUSED_RESULT. Created 6 years, 8 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
« no previous file with comments | « src/objects.cc ('k') | src/type-info.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 14563 matching lines...) Expand 10 before | Expand all | Expand 10 after
14574 HandleScope scope(isolate); 14574 HandleScope scope(isolate);
14575 ASSERT(args.length() == 1); 14575 ASSERT(args.length() == 1);
14576 CONVERT_ARG_HANDLE_CHECKED(Object, object, 0); 14576 CONVERT_ARG_HANDLE_CHECKED(Object, object, 0);
14577 if (!object->IsJSObject()) return Smi::FromInt(0); 14577 if (!object->IsJSObject()) return Smi::FromInt(0);
14578 Handle<JSObject> js_object = Handle<JSObject>::cast(object); 14578 Handle<JSObject> js_object = Handle<JSObject>::cast(object);
14579 if (!js_object->map()->is_deprecated()) return Smi::FromInt(0); 14579 if (!js_object->map()->is_deprecated()) return Smi::FromInt(0);
14580 // This call must not cause lazy deopts, because it's called from deferred 14580 // This call must not cause lazy deopts, because it's called from deferred
14581 // code where we can't handle lazy deopts for lack of a suitable bailout 14581 // code where we can't handle lazy deopts for lack of a suitable bailout
14582 // ID. So we just try migration and signal failure if necessary, 14582 // ID. So we just try migration and signal failure if necessary,
14583 // which will also trigger a deopt. 14583 // which will also trigger a deopt.
14584 Handle<Object> result = JSObject::TryMigrateInstance(js_object); 14584 if (!JSObject::TryMigrateInstance(js_object)) return Smi::FromInt(0);
14585 if (result.is_null()) return Smi::FromInt(0);
14586 return *object; 14585 return *object;
14587 } 14586 }
14588 14587
14589 14588
14590 RUNTIME_FUNCTION(RuntimeHidden_GetFromCache) { 14589 RUNTIME_FUNCTION(RuntimeHidden_GetFromCache) {
14591 SealHandleScope shs(isolate); 14590 SealHandleScope shs(isolate);
14592 // This is only called from codegen, so checks might be more lax. 14591 // This is only called from codegen, so checks might be more lax.
14593 CONVERT_ARG_CHECKED(JSFunctionResultCache, cache, 0); 14592 CONVERT_ARG_CHECKED(JSFunctionResultCache, cache, 0);
14594 CONVERT_ARG_CHECKED(Object, key, 1); 14593 CONVERT_ARG_CHECKED(Object, key, 1);
14595 14594
(...skipping 547 matching lines...) Expand 10 before | Expand all | Expand 10 after
15143 } 15142 }
15144 return NULL; 15143 return NULL;
15145 } 15144 }
15146 15145
15147 15146
15148 const Runtime::Function* Runtime::FunctionForId(Runtime::FunctionId id) { 15147 const Runtime::Function* Runtime::FunctionForId(Runtime::FunctionId id) {
15149 return &(kIntrinsicFunctions[static_cast<int>(id)]); 15148 return &(kIntrinsicFunctions[static_cast<int>(id)]);
15150 } 15149 }
15151 15150
15152 } } // namespace v8::internal 15151 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/objects.cc ('k') | src/type-info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698