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:
Nathan Froyd
2016-03-08 16:29:25 -05:00
parent 2f2367194f
commit 63fef39e49
20 changed files with 78 additions and 50 deletions

View File

@@ -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) {