mirror of
https://github.com/roytam1/palemoon27.git
synced 2026-05-26 14:30:27 +00:00
9a431a3c46
- Bug 1054759 - Part 2: ES6 Symbol.unscopables. r=shu. (203f6a1c7a) - Bug 887016 - Part 6: Add RegExpPrototypeOptimizable. r=nbp (651d54bd7e) - Bug 887016 - Part 7: Add RegExpInstanceOptimizable. r=nbp (82701b3637) - Bug 887016 - Part 8: Add ObjectHasPrototype. r=nbp (8a9da8f9b8) - Bug 887016 - Part 9: Implement RegExp.prototype[@@match] and call it from String.prototype.match. r=till (9092676327) - Bug 887016 - Part 10: Implement RegExp.prototype[@@search] and call it from String.prototype.search. r=till (dcbd8beecb) - Bug 887016 - Part 11: Implement RegExp.prototype[@@replace] and call it from String.prototype.replace. r=h4writer,till (af2639291b) - Bug 887016 - Part 12: Implement RegExp[@@species] getter. r=evilpie,bholley (f512f802d9) - Bug 887016 - Part 13: Implement RegExp.prototype[@@split] and call it from String.prototype.split. r=h4writer,till (1fd28b046d) - Bug 887016 - Part 14: Add RegExpSearcher. r=h4writer (e5a02d6c03) - Bug 887016 - Part 15: Use RegExpSearcher in RegExp.prototype[@@replace] optimized path. r=till (4e04250fcc) - Bug 887016 - Part 16: Use RegExpSearcher in RegExp.prototype[@@searchâ] optimized path. r=till (742a1038f4) - Bug 887016 - Part 17: Mark sunspider/check-string-unpack-code.js timeout on cgc jittest. r=till (f80f8d69d5) - Bug 1251502 - Add a generic duplex resampler and a duplex WASAPI implementation. r=kinetik (5524ce1700) - Bug 1251502 - cubeb does not use cubeb-stdint.h anymore, remove it from moz.build. r=kinetik (76155cf9ee) - Bug 1259290: Part 1 - Remove unnecessary JS_ReportError calls. r=bz (1620f29a73) - Bug 1259290: Part 2 - Remove the cx from [Add|Remove]ChildWorker. r=bz (be70bd421e) - Bug 1259290: Part 3 - Remove JS_ReportError and cx handling from RegisterWorker and friends. r=bz,jandem (c646e0c7f3) - Bug 1259290: Part 4 - Remove JS_ReportError for a situation that can never happen. r=bz (ee012c8011) - Bug 1259290: Part 5 - Remove the cx from WorkerFeature::Notify. r=bz (79aff7ecb1) - Bug 1263490 - Part 1: Do not search for dollar if the length of replaceValue is 0 or 1. r=till (c88d75ff60) - Bug 1263341 - Check lastIndex in non-global replace. r=till (86d5e60a02) - Bug 1263851 - Check lastIndex after loop in RegExp.prototype[@@split]. r=till (70dc91fcf9) - Bug 1251529: In object metadata world, rename "object metadata" to "allocation metadata" and "callback" to "builder". r=fitzgen (fc8047d86d) - No bug - Add guards to tests that use TypedObject. r=me, a=bustage (87bda8c856) - Bug 1251922 - Do not create metadata objects for temporary parse globals; r=fitzgen (5b354f3cc4) - Bug 1251529: Replace allocation metadata callback with a builder class. r=fitzgen (520fb736fe) - Bug 1251529: Pass AutoEnterOOMUnsafeRegion to allocation metadata builder methods. r=fitzgen (6a2e6b05ac) - Bug 1251529: Provide default constructor for js::AllocationMetadataBuilder, js::SavedStacks::MetadataBuilder. r=shu (2300b6739c) - Bug 1251529: Provide default constructor for ShellAllocationMetadataBuilder. r=orange (24168aa011) - Bug 1259877 - Change js::DirectEval to take v/vp rather than a CallArgs to operate on directly. r=efaust (af03a24bde) - Bug 1259877 - Eliminate Invoke(JSContext*, const CallArgs&, MaybeConstruct = NO_CONSTRUCT) by 1) renaming it to a more-internal name, 2) adding an Invoke overload for existing InvokeArgs providers only, and 3) adding an InternalInvoke function to temporarily mark non-InvokeArgs places using the existing signature that will later be changed not to. r=efaust (7e4efa9129) - Bug 1259877 - Rename Invoke[GS]etter to Call[GS]etter, more in line with the spec's calling nomenclature. r=jorendorff (0b00a38913) - Bug 1259877 - Add CallFromStack for certain internal users, js::Call for general use, and mark js::Invoke as deprecated. r=efaust (56186b13fd) - Bug 1259877 - Add a bunch of Call overloads for 0/1/2 arguments with this as (HandleValue | JSObject*). r=jorendorff (ce764cca3a) - Bug 1259877 - Update Debugger code to use js::Call rather than Invoke. r=jorendorff (45f219d2f0) - Bug 1259877 - Update various miscellaneous function-calling code to js::Call. r=jandem (973c3c4171)
111 lines
2.5 KiB
C++
111 lines
2.5 KiB
C++
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
#include "mozilla/dom/cache/Feature.h"
|
|
|
|
#include "mozilla/dom/cache/ActorChild.h"
|
|
#include "WorkerPrivate.h"
|
|
|
|
namespace mozilla {
|
|
namespace dom {
|
|
namespace cache {
|
|
|
|
using mozilla::dom::workers::Terminating;
|
|
using mozilla::dom::workers::Status;
|
|
using mozilla::dom::workers::WorkerPrivate;
|
|
|
|
// static
|
|
already_AddRefed<Feature>
|
|
Feature::Create(WorkerPrivate* aWorkerPrivate)
|
|
{
|
|
MOZ_ASSERT(aWorkerPrivate);
|
|
|
|
RefPtr<Feature> feature = new Feature(aWorkerPrivate);
|
|
|
|
if (!aWorkerPrivate->AddFeature(feature)) {
|
|
return nullptr;
|
|
}
|
|
|
|
return feature.forget();
|
|
}
|
|
|
|
void
|
|
Feature::AddActor(ActorChild* aActor)
|
|
{
|
|
NS_ASSERT_OWNINGTHREAD(Feature);
|
|
MOZ_ASSERT(aActor);
|
|
MOZ_ASSERT(!mActorList.Contains(aActor));
|
|
|
|
mActorList.AppendElement(aActor);
|
|
|
|
// Allow an actor to be added after we've entered the Notifying case. We
|
|
// can't stop the actor creation from racing with out destruction of the
|
|
// other actors and we need to wait for this extra one to close as well.
|
|
// Signal it should destroy itself right away.
|
|
if (mNotified) {
|
|
aActor->StartDestroy();
|
|
}
|
|
}
|
|
|
|
void
|
|
Feature::RemoveActor(ActorChild* aActor)
|
|
{
|
|
NS_ASSERT_OWNINGTHREAD(Feature);
|
|
MOZ_ASSERT(aActor);
|
|
|
|
DebugOnly<bool> removed = mActorList.RemoveElement(aActor);
|
|
|
|
MOZ_ASSERT(removed);
|
|
MOZ_ASSERT(!mActorList.Contains(aActor));
|
|
}
|
|
|
|
bool
|
|
Feature::Notified() const
|
|
{
|
|
return mNotified;
|
|
}
|
|
|
|
bool
|
|
Feature::Notify(Status aStatus)
|
|
{
|
|
NS_ASSERT_OWNINGTHREAD(Feature);
|
|
|
|
// When the service worker thread is stopped we will get Terminating,
|
|
// but nothing higher than that. We must shut things down at Terminating.
|
|
if (aStatus < Terminating || mNotified) {
|
|
return true;
|
|
}
|
|
|
|
mNotified = true;
|
|
|
|
// Start the asynchronous destruction of our actors. These will call back
|
|
// into RemoveActor() once the actor is destroyed.
|
|
for (uint32_t i = 0; i < mActorList.Length(); ++i) {
|
|
mActorList[i]->StartDestroy();
|
|
}
|
|
|
|
return true;
|
|
}
|
|
|
|
Feature::Feature(WorkerPrivate* aWorkerPrivate)
|
|
: mWorkerPrivate(aWorkerPrivate)
|
|
, mNotified(false)
|
|
{
|
|
MOZ_ASSERT(mWorkerPrivate);
|
|
}
|
|
|
|
Feature::~Feature()
|
|
{
|
|
NS_ASSERT_OWNINGTHREAD(Feature);
|
|
MOZ_ASSERT(mActorList.IsEmpty());
|
|
|
|
mWorkerPrivate->RemoveFeature(this);
|
|
}
|
|
|
|
} // namespace cache
|
|
} // namespace dom
|
|
} // namespace mozilla
|