Commit a53986bf authored by Jan de Mooij's avatar Jan de Mooij
Browse files

Bug 1302448 part 1 - Rename CycleCollectedJSRuntime to CycleCollectedJSContext. r=mccr8

--HG--
rename : xpcom/base/CycleCollectedJSRuntime.cpp => xpcom/base/CycleCollectedJSContext.cpp
rename : xpcom/base/CycleCollectedJSRuntime.h => xpcom/base/CycleCollectedJSContext.h
extra : rebase_source : 075214b5057f151520926715b6154e99ae80a0b3
parent 15d049af
Loading
Loading
Loading
Loading
+7 −7
Original line number Diff line number Diff line
@@ -16,7 +16,7 @@
#include "js/UbiNodeDominatorTree.h"
#include "js/UbiNodeShortestPaths.h"
#include "mozilla/Attributes.h"
#include "mozilla/CycleCollectedJSRuntime.h"
#include "mozilla/CycleCollectedJSContext.h"
#include "mozilla/devtools/AutoMemMap.h"
#include "mozilla/devtools/CoreDump.pb.h"
#include "mozilla/devtools/DeserializedNode.h"
@@ -62,9 +62,9 @@ using JS::ubi::ShortestPaths;
MallocSizeOf
GetCurrentThreadDebuggerMallocSizeOf()
{
  auto ccrt = CycleCollectedJSRuntime::Get();
  MOZ_ASSERT(ccrt);
  auto cx = ccrt->Context();
  auto ccjscx = CycleCollectedJSContext::Get();
  MOZ_ASSERT(ccjscx);
  auto cx = ccjscx->Context();
  MOZ_ASSERT(cx);
  auto mallocSizeOf = JS::dbg::GetDebuggerMallocSizeOf(cx);
  MOZ_ASSERT(mallocSizeOf);
@@ -555,9 +555,9 @@ HeapSnapshot::ComputeDominatorTree(ErrorResult& rv)
{
  Maybe<JS::ubi::DominatorTree> maybeTree;
  {
    auto ccrt = CycleCollectedJSRuntime::Get();
    MOZ_ASSERT(ccrt);
    auto cx = ccrt->Context();
    auto ccjscx = CycleCollectedJSContext::Get();
    MOZ_ASSERT(ccjscx);
    auto cx = ccjscx->Context();
    MOZ_ASSERT(cx);
    JS::AutoCheckCannotGC nogc(cx);
    maybeTree = JS::ubi::DominatorTree::Create(cx, nogc, getRoot());
+2 −2
Original line number Diff line number Diff line
@@ -15,7 +15,7 @@
#include "gmock/gmock.h"
#include "mozilla/devtools/HeapSnapshot.h"
#include "mozilla/dom/ChromeUtils.h"
#include "mozilla/CycleCollectedJSRuntime.h"
#include "mozilla/CycleCollectedJSContext.h"
#include "mozilla/Move.h"
#include "js/Principals.h"
#include "js/UbiNode.h"
@@ -60,7 +60,7 @@ struct DevTools : public ::testing::Test {
  }

  JSContext* getContext() {
    return CycleCollectedJSRuntime::Get()->Context();
    return CycleCollectedJSContext::Get()->Context();
  }

  static void reportError(JSContext* cx, const char* message, JSErrorReport* report) {
+2 −2
Original line number Diff line number Diff line
@@ -1335,14 +1335,14 @@ Animation::GetRenderedDocument() const
void
Animation::DoFinishNotification(SyncNotifyFlag aSyncNotifyFlag)
{
  CycleCollectedJSRuntime* runtime = CycleCollectedJSRuntime::Get();
  CycleCollectedJSContext* context = CycleCollectedJSContext::Get();

  if (aSyncNotifyFlag == SyncNotifyFlag::Sync) {
    DoFinishNotificationImmediately();
  } else if (!mFinishNotificationTask.IsPending()) {
    RefPtr<nsRunnableMethod<Animation>> runnable =
      NewRunnableMethod(this, &Animation::DoFinishNotificationImmediately);
    runtime->DispatchToMicroTask(do_AddRef(runnable));
    context->DispatchToMicroTask(do_AddRef(runnable));
    mFinishNotificationTask = runnable.forget();
  }
}
+1 −1
Original line number Diff line number Diff line
@@ -12,7 +12,7 @@
#include "jsfriendapi.h"
#include "mozilla/Assertions.h"
#include "mozilla/CondVar.h"
#include "mozilla/CycleCollectedJSRuntime.h"
#include "mozilla/CycleCollectedJSContext.h"
#include "mozilla/dom/asmjscache/PAsmJSCacheEntryChild.h"
#include "mozilla/dom/asmjscache/PAsmJSCacheEntryParent.h"
#include "mozilla/dom/ContentChild.h"
+3 −3
Original line number Diff line number Diff line
@@ -7,7 +7,7 @@
#include "mozilla/dom/ScriptSettings.h"
#include "mozilla/ThreadLocal.h"
#include "mozilla/Assertions.h"
#include "mozilla/CycleCollectedJSRuntime.h"
#include "mozilla/CycleCollectedJSContext.h"

#include "jsapi.h"
#include "xpcpublic.h"
@@ -289,14 +289,14 @@ namespace danger {
JSContext*
GetJSContext()
{
  return CycleCollectedJSRuntime::Get()->Context();
  return CycleCollectedJSContext::Get()->Context();
}
} // namespace danger

JS::RootingContext*
RootingCx()
{
  return CycleCollectedJSRuntime::Get()->RootingCx();
  return CycleCollectedJSContext::Get()->RootingCx();
}

AutoJSAPI::AutoJSAPI()
Loading