Backed out changeset 0dca237df7e2 (bug 1160307) for causing bug 1184752.

This commit is contained in:
Ryan VanderMeulen
2015-07-16 20:38:13 -04:00
parent 4eb89db818
commit f9e08f4bc8
15 changed files with 21 additions and 196 deletions

View File

@@ -13937,9 +13937,7 @@ public:
const char* aReason,
const char16_t* aFunctionName,
const char16_t* aFileName,
uint32_t aLineNumber,
JS::Handle<JS::Value> aAsyncStack,
JS::Handle<JS::Value> aAsyncCause)
uint32_t aLineNumber)
: TimelineMarker(aDocShell, aName, TRACING_INTERVAL_START,
NS_ConvertUTF8toUTF16(aReason),
NO_STACK)
@@ -13947,11 +13945,6 @@ public:
, mFileName(aFileName)
, mLineNumber(aLineNumber)
{
JSContext* ctx = nsContentUtils::GetCurrentJSContext();
if (ctx) {
mAsyncStack.init(ctx, aAsyncStack);
mAsyncCause.init(ctx, aAsyncCause);
}
}
void AddDetails(JSContext* aCx, mozilla::dom::ProfileTimelineMarker& aMarker)
@@ -13964,17 +13957,6 @@ public:
stackFrame.mLine.Construct(mLineNumber);
stackFrame.mSource.Construct(mFileName);
stackFrame.mFunctionDisplayName.Construct(mFunctionName);
if (mAsyncStack.isObject() && !mAsyncStack.isNullOrUndefined() &&
mAsyncCause.isString()) {
JS::Rooted<JSObject*> asyncStack(aCx, mAsyncStack.toObjectOrNull());
JS::Rooted<JSString*> asyncCause(aCx, mAsyncCause.toString());
JS::Rooted<JSObject*> parentFrame(aCx);
if (!JS::CopyAsyncStack(aCx, asyncStack, asyncCause, &parentFrame, 0)) {
JS_ClearPendingException(aCx);
} else {
stackFrame.mAsyncParent = parentFrame;
}
}
JS::Rooted<JS::Value> newStack(aCx);
if (ToJSValue(aCx, stackFrame, &newStack)) {
@@ -13991,17 +13973,13 @@ private:
nsString mFunctionName;
nsString mFileName;
uint32_t mLineNumber;
JS::PersistentRooted<JS::Value> mAsyncStack;
JS::PersistentRooted<JS::Value> mAsyncCause;
};
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 uint32_t aLineNumber)
{
bool timelineOn = nsIDocShell::GetRecordProfileTimelineMarkers();
@@ -14010,8 +13988,7 @@ nsDocShell::NotifyJSRunToCompletionStart(const char* aReason,
mozilla::UniquePtr<TimelineMarker> marker =
MakeUnique<JavascriptTimelineMarker>(this, "Javascript", aReason,
aFunctionName, aFilename,
aLineNumber, aAsyncStack,
aAsyncCause);
aLineNumber);
AddProfileTimelineMarker(Move(marker));
}
mJSRunToCompletionDepth++;