Bug 1177488 - use |const char*| for representing async call reasons; r=bz,fitzgen
Using a simple |const char*| is more memory-efficient than allocating a JS string. We still have to allocate the JS string for passing things into JS, but ideally we will be able to move the point of allocation much closer to where it's actually needed, rather than indiscriminantly doing it all the time.
This commit is contained in:
@@ -14111,13 +14111,14 @@ nsDocShell::GetOpener()
|
||||
return opener;
|
||||
}
|
||||
|
||||
// The caller owns |aAsyncCause| here.
|
||||
void
|
||||
nsDocShell::NotifyJSRunToCompletionStart(const char* aReason,
|
||||
const char16_t* aFunctionName,
|
||||
const char16_t* aFilename,
|
||||
const uint32_t aLineNumber,
|
||||
JS::Handle<JS::Value> aAsyncStack,
|
||||
JS::Handle<JS::Value> aAsyncCause)
|
||||
const char* aAsyncCause)
|
||||
{
|
||||
// If first start, mark interval start.
|
||||
if (mJSRunToCompletionDepth == 0) {
|
||||
|
||||
Reference in New Issue
Block a user