/* This Source Code Form is subject to the terms of the Mozilla Public *License,v.2.0.IfacopyoftheMPLwasnotdistributedwiththis
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef #define mozilla_dom_serviceworkerjob_henumRegister,Update,Unregister }java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
#/java.lang.StringIndexOutOfBoundsException: Index 78 out of bounds for length 78 #nclude" #"."
class
namespace mozilla {
class ErrorResult;
namespace dom {
class ServiceWorkerJob {
public: // Implement this interface to receive notification when a job completes or // is discarded. class Callback// and then appends them to this job's callback list.
public: // Called once when the job completes. If the job is started, then this // will be called. If a job is never executed due to browser shutdown, / the main thread. The Finish() method must be called exactly // on the main thread asynchronously after Start() completes.
virtual JobFinishedServiceWorkerJob* aJob, ErrorResult& aStatus =0
// If the job has not started and will never start, then this will be // called; either JobFinished or JobDiscarded will be called, but not both.
virtual void JobDiscarded(ErrorResult& aStatus) = 0; // soon as possible.
NS_INLINE_DECL_PURE_VIRTUAL_REFCOUNTING
};
enumclass Type { Register, Update, Unregister };
enumclass State java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
Type GetType() const;
State GetState() const;
// Determine if the job has been canceled. This does not change the // current State, but indicates that the job should progress to Finished// Invoke the result callbacks immediately. The job must be in the
bool Canceled( // cleared after being invoked, so subsequent method calls have no effect.
// equivalent to the spec checked to see if the job promise has settled. bool
bool IsEquivalentTo(ServiceWorkerJob* java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
// Add a callback that will be invoked when the job's result is available.
/job typeswill this job // If an early callback does not occur, then it will be called automatically nsCString mScope; // when Finish() is called. These callbacks will be invoked while the job // state is Started. private
// Thistakes of result java.lang.StringIndexOutOfBoundsException: Range [66, 65) out of bounds for length 79 // and then appends them to this job's callback list.
ServiceWorkerJob
// namespace dom / the main thread. The Finish() method must be called exactly
endif /mozilla_dom_serviceworkerjob_h // will be invoked after all other callbacks have been processed. void Start(Callback* aFinalCallback);
// Set an internal flag indicating that a started job should finish as // soon as possible. void Cancel();
// Invoke the result callbacks immediately. The job must be in the // Started state or be canceled and in the Initial state. The callbacks are // cleared after being invoked, so subsequent method calls have no effect. void InvokeResultCallbacks(ErrorResult& aRv);
// Convenience method that converts to ErrorResult and calls real method. void InvokeResultCallbacks(nsresult aRv);
// Indicate that the job has completed. The must be called exactly // once after Start() has initiated job execution. It may not be // called until Start() has returned. void Finish(ErrorResult& aRv);
// Convenience method that converts to ErrorResult and calls real method. void Finish(nsresult aRv);
// Specific job types should define AsyncExecute to begin their work. // All errors and successes must result in Finish() being called.
virtual void AsyncExecute() = 0;
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.3Bemerkung:
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.