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

Unified Diff: src/isolate.cc

Issue 148153010: Synchronize with r15701. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: Created 6 years, 11 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/icu_util.cc ('k') | src/json-stringifier.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/isolate.cc
diff --git a/src/isolate.cc b/src/isolate.cc
index 9b9132acf2b699473fe60eeee61e45571c5ed7ae..b960d100e96e0005a58a242ba1935e6d31101af9 100644
--- a/src/isolate.cc
+++ b/src/isolate.cc
@@ -624,10 +624,8 @@ static bool IsVisibleInStackTrace(StackFrame* raw_frame,
// Only display JS frames.
if (!raw_frame->is_java_script()) return false;
JavaScriptFrame* frame = JavaScriptFrame::cast(raw_frame);
- Object* raw_fun = frame->function();
- // Not sure when this can happen but skip it just in case.
- if (!raw_fun->IsJSFunction()) return false;
- if ((raw_fun == caller) && !(*seen_caller)) {
+ JSFunction* fun = frame->function();
+ if ((fun == caller) && !(*seen_caller)) {
*seen_caller = true;
return false;
}
@@ -639,7 +637,6 @@ static bool IsVisibleInStackTrace(StackFrame* raw_frame,
// The --builtins-in-stack-traces command line flag allows including
// internal call sites in the stack trace for debugging purposes.
if (!FLAG_builtins_in_stack_traces) {
- JSFunction* fun = JSFunction::cast(raw_fun);
if (frame->receiver()->IsJSBuiltinsObject() ||
(fun->IsBuiltin() && !fun->shared()->native())) {
return false;
@@ -1203,7 +1200,7 @@ void Isolate::PrintCurrentStackTrace(FILE* out) {
int pos = frame->LookupCode()->SourcePosition(frame->pc());
Handle<Object> pos_obj(Smi::FromInt(pos), this);
// Fetch function and receiver.
- Handle<JSFunction> fun(JSFunction::cast(frame->function()));
+ Handle<JSFunction> fun(frame->function());
Handle<Object> recv(frame->receiver(), this);
// Advance to the next JavaScript frame and determine if the
// current frame is the top-level frame.
@@ -1227,7 +1224,7 @@ void Isolate::ComputeLocation(MessageLocation* target) {
StackTraceFrameIterator it(this);
if (!it.done()) {
JavaScriptFrame* frame = it.frame();
- JSFunction* fun = JSFunction::cast(frame->function());
+ JSFunction* fun = frame->function();
Object* script = fun->shared()->script();
if (script->IsScript() &&
!(Script::cast(script)->source()->IsUndefined())) {
« no previous file with comments | « src/icu_util.cc ('k') | src/json-stringifier.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698