mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1200484 (part 4) - Expose the column number in nsJSUtils::GetCallingLocation(). r=mrbkap.
The patch also makes the filename optional, to match the column, and to make GetCallingLocation() more similar to JS::DescribeScriptedCaller().
This commit is contained in:
parent
2951bb6385
commit
14ffadf4ee
@ -35,10 +35,10 @@ using namespace mozilla::dom;
|
||||
|
||||
bool
|
||||
nsJSUtils::GetCallingLocation(JSContext* aContext, nsACString& aFilename,
|
||||
uint32_t* aLineno)
|
||||
uint32_t* aLineno, uint32_t* aColumn)
|
||||
{
|
||||
JS::AutoFilename filename;
|
||||
if (!JS::DescribeScriptedCaller(aContext, &filename, aLineno)) {
|
||||
if (!JS::DescribeScriptedCaller(aContext, &filename, aLineno, aColumn)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -48,10 +48,10 @@ nsJSUtils::GetCallingLocation(JSContext* aContext, nsACString& aFilename,
|
||||
|
||||
bool
|
||||
nsJSUtils::GetCallingLocation(JSContext* aContext, nsAString& aFilename,
|
||||
uint32_t* aLineno)
|
||||
uint32_t* aLineno, uint32_t* aColumn)
|
||||
{
|
||||
JS::AutoFilename filename;
|
||||
if (!JS::DescribeScriptedCaller(aContext, &filename, aLineno)) {
|
||||
if (!JS::DescribeScriptedCaller(aContext, &filename, aLineno, aColumn)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -35,9 +35,11 @@ class nsJSUtils
|
||||
{
|
||||
public:
|
||||
static bool GetCallingLocation(JSContext* aContext, nsACString& aFilename,
|
||||
uint32_t* aLineno);
|
||||
uint32_t* aLineno = nullptr,
|
||||
uint32_t* aColumn = nullptr);
|
||||
static bool GetCallingLocation(JSContext* aContext, nsAString& aFilename,
|
||||
uint32_t* aLineno);
|
||||
uint32_t* aLineno = nullptr,
|
||||
uint32_t* aColumn = nullptr);
|
||||
|
||||
static nsIScriptGlobalObject *GetStaticScriptGlobal(JSObject* aObj);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user