ScriptDebugServer is guarded with (JAVASCRIPT_DEBUGGER), which is not defined on
Android. An attempt was made in https://bugs.webkit.org/show_bug.cgi?id=38531 to
move ScriptDebugServer::topStackFrame() to ScriptCallStack to avoid the linker
error. However, this causes crashes on Android as our version of the V8 snapshot
is not consistent with this.
This fix is a temporary work-around to avoid the problem by simply not calling
ScriptDebugServer::topStackFrame(). The problem will be fixed properly upstream
when this code is refactored, as described in the WebKit bug.
Change-Id: I3952eed2e56dbb5a6f6204276bd499e79bba2227
bool ScriptCallStack::callLocation(String* sourceName, int* sourceLineNumber, String* functionName)
{
+#if PLATFORM(ANDROID)
+ return false;
+#else
if (!ScriptDebugServer::topStackFrame(*sourceName, *sourceLineNumber, *functionName))
return false;
*sourceLineNumber += 1;
return true;
+#endif
}
ScriptCallStack::ScriptCallStack(const v8::Arguments& arguments, unsigned skipArgumentCount, String sourceName, int sourceLineNumber, String functionName)