mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 805222 - Change some usages of GetFunctionId to GetFunctionDisplayId for better JS stacktrace. r=bholley,robcee
This commit is contained in:
parent
2070bbbf7b
commit
85c2e983ae
@ -31,7 +31,7 @@ function tabLoaded() {
|
||||
function performChecks() {
|
||||
// The expected stack trace object.
|
||||
let stacktrace = [
|
||||
{ filename: TEST_URI, lineNumber: 9, functionName: null, language: 2 },
|
||||
{ filename: TEST_URI, lineNumber: 9, functionName: "window.foobar585956c", language: 2 },
|
||||
{ filename: TEST_URI, lineNumber: 14, functionName: "foobar585956b", language: 2 },
|
||||
{ filename: TEST_URI, lineNumber: 18, functionName: "foobar585956a", language: 2 },
|
||||
{ filename: TEST_URI, lineNumber: 21, functionName: null, language: 2 }
|
||||
|
@ -118,7 +118,7 @@ function testConsoleGroup(aMessageObject) {
|
||||
function startTraceTest() {
|
||||
gLevel = "trace";
|
||||
gArgs = [
|
||||
{filename: TEST_URI, lineNumber: 6, functionName: null, language: 2},
|
||||
{filename: TEST_URI, lineNumber: 6, functionName: "window.foobar585956c", language: 2},
|
||||
{filename: TEST_URI, lineNumber: 11, functionName: "foobar585956b", language: 2},
|
||||
{filename: TEST_URI, lineNumber: 15, functionName: "foobar585956a", language: 2},
|
||||
{filename: TEST_URI, lineNumber: 1, functionName: "onclick", language: 2}
|
||||
|
@ -116,7 +116,7 @@ XPCJSStackFrame::CreateStack(JSContext* cx, XPCJSStackFrame** stack)
|
||||
|
||||
JSFunction* fun = desc->frames[i].fun;
|
||||
if (fun) {
|
||||
JSString *funid = JS_GetFunctionId(fun);
|
||||
JSString *funid = JS_GetFunctionDisplayId(fun);
|
||||
if (funid) {
|
||||
size_t length = JS_GetStringEncodingLength(cx, funid);
|
||||
if (length != size_t(-1)) {
|
||||
|
@ -1466,7 +1466,7 @@ XPC_WN_CallMethod(JSContext *cx, unsigned argc, jsval *vp)
|
||||
#ifdef DEBUG_slimwrappers
|
||||
{
|
||||
JSFunction* fun = funobj->getFunctionPrivate();
|
||||
JSString *funid = JS_GetFunctionId(fun);
|
||||
JSString *funid = JS_GetFunctionDisplayId(fun);
|
||||
JSAutoByteString bytes;
|
||||
const char *funname = !funid ? "" : bytes.encode(cx, funid) ? bytes.ptr() : "<error>";
|
||||
SLIM_LOG_WILL_MORPH_FOR_PROP(cx, obj, funname);
|
||||
@ -1503,7 +1503,7 @@ XPC_WN_GetterSetter(JSContext *cx, unsigned argc, jsval *vp)
|
||||
const char* funname = nullptr;
|
||||
JSAutoByteString bytes;
|
||||
if (JS_TypeOfValue(cx, JS_CALLEE(cx, vp)) == JSTYPE_FUNCTION) {
|
||||
JSString *funid = JS_GetFunctionId(funobj->getFunctionPrivate());
|
||||
JSString *funid = JS_GetFunctionDisplayId(funobj->getFunctionPrivate());
|
||||
funname = !funid ? "" : bytes.encode(cx, funid) ? bytes.ptr() : "<error>";
|
||||
}
|
||||
SLIM_LOG_WILL_MORPH_FOR_PROP(cx, obj, funname);
|
||||
|
@ -766,7 +766,7 @@ DescribeGCThing(bool isMarked, void *p, JSGCTraceKind traceKind,
|
||||
clasp->name, si->GetJSClass()->name);
|
||||
} else if (clasp == &js::FunctionClass) {
|
||||
JSFunction *fun = JS_GetObjectFunction(obj);
|
||||
JSString *str = JS_GetFunctionId(fun);
|
||||
JSString *str = JS_GetFunctionDisplayId(fun);
|
||||
if (str) {
|
||||
NS_ConvertUTF16toUTF8 fname(JS_GetInternedStringChars(str));
|
||||
JS_snprintf(name, sizeof(name),
|
||||
|
Loading…
Reference in New Issue
Block a user