[runtime] temporarily transform IsContext check from DCHECK to CHECK

We are enabling this trial on canary to see if we can flush out some missing
context restores.

BUG=

Review-Url: https://codereview.chromium.org/2164633002
Cr-Commit-Position: refs/heads/master@{#37875}
This commit is contained in:
cbruni 2016-07-19 08:25:39 -07:00 committed by Commit bot
parent 263131cf2a
commit ec94ad400d
2 changed files with 27 additions and 25 deletions

View File

@ -81,6 +81,7 @@ double ClobberDoubleRegisters(double x1, double x2, double x3, double x4);
// TODO(cbruni): add global flag to check whether any tracing events have been // TODO(cbruni): add global flag to check whether any tracing events have been
// enabled. // enabled.
// TODO(cbruni): Convert the IsContext CHECK back to a DCHECK.
#define RUNTIME_FUNCTION_RETURNS_TYPE(Type, Name) \ #define RUNTIME_FUNCTION_RETURNS_TYPE(Type, Name) \
static INLINE(Type __RT_impl_##Name(Arguments args, Isolate* isolate)); \ static INLINE(Type __RT_impl_##Name(Arguments args, Isolate* isolate)); \
\ \
@ -94,7 +95,7 @@ double ClobberDoubleRegisters(double x1, double x2, double x3, double x4);
} \ } \
\ \
Type Name(int args_length, Object** args_object, Isolate* isolate) { \ Type Name(int args_length, Object** args_object, Isolate* isolate) { \
DCHECK(isolate->context() == nullptr || isolate->context()->IsContext()); \ CHECK(isolate->context() == nullptr || isolate->context()->IsContext()); \
CLOBBER_DOUBLE_REGISTERS(); \ CLOBBER_DOUBLE_REGISTERS(); \
if (FLAG_runtime_call_stats) { \ if (FLAG_runtime_call_stats) { \
return Stats_##Name(args_length, args_object, isolate); \ return Stats_##Name(args_length, args_object, isolate); \

View File

@ -76,30 +76,31 @@ class BuiltinArguments : public Arguments {
// through the BuiltinArguments object args. // through the BuiltinArguments object args.
// TODO(cbruni): add global flag to check whether any tracing events have been // TODO(cbruni): add global flag to check whether any tracing events have been
// enabled. // enabled.
#define BUILTIN(name) \ // TODO(cbruni): Convert the IsContext CHECK back to a DCHECK.
MUST_USE_RESULT static Object* Builtin_Impl_##name(BuiltinArguments args, \ #define BUILTIN(name) \
Isolate* isolate); \ MUST_USE_RESULT static Object* Builtin_Impl_##name(BuiltinArguments args, \
\ Isolate* isolate); \
V8_NOINLINE static Object* Builtin_Impl_Stats_##name( \ \
int args_length, Object** args_object, Isolate* isolate) { \ V8_NOINLINE static Object* Builtin_Impl_Stats_##name( \
BuiltinArguments args(args_length, args_object); \ int args_length, Object** args_object, Isolate* isolate) { \
RuntimeCallTimerScope timer(isolate, &RuntimeCallStats::Builtin_##name); \ BuiltinArguments args(args_length, args_object); \
TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("v8.runtime"), \ RuntimeCallTimerScope timer(isolate, &RuntimeCallStats::Builtin_##name); \
"V8.Builtin_" #name); \ TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("v8.runtime"), \
return Builtin_Impl_##name(args, isolate); \ "V8.Builtin_" #name); \
} \ return Builtin_Impl_##name(args, isolate); \
\ } \
MUST_USE_RESULT Object* Builtin_##name( \ \
int args_length, Object** args_object, Isolate* isolate) { \ MUST_USE_RESULT Object* Builtin_##name( \
DCHECK(isolate->context() == nullptr || isolate->context()->IsContext()); \ int args_length, Object** args_object, Isolate* isolate) { \
if (FLAG_runtime_call_stats) { \ CHECK(isolate->context() == nullptr || isolate->context()->IsContext()); \
return Builtin_Impl_Stats_##name(args_length, args_object, isolate); \ if (FLAG_runtime_call_stats) { \
} \ return Builtin_Impl_Stats_##name(args_length, args_object, isolate); \
BuiltinArguments args(args_length, args_object); \ } \
return Builtin_Impl_##name(args, isolate); \ BuiltinArguments args(args_length, args_object); \
} \ return Builtin_Impl_##name(args, isolate); \
\ } \
MUST_USE_RESULT static Object* Builtin_Impl_##name(BuiltinArguments args, \ \
MUST_USE_RESULT static Object* Builtin_Impl_##name(BuiltinArguments args, \
Isolate* isolate) Isolate* isolate)
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------