Skip to content

Commit

Permalink
jsglue.cpp: Fix -Winconsistent-missing-override (#525)
Browse files Browse the repository at this point in the history
Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com>
  • Loading branch information
jschwe authored Nov 22, 2024
1 parent 18ab014 commit f68e385
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion mozjs-sys/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "mozjs_sys"
description = "System crate for the Mozilla SpiderMonkey JavaScript engine."
repository.workspace = true
version = "0.128.3-5"
version = "0.128.3-6"
authors = ["Mozilla"]
links = "mozjs"
build = "build.rs"
Expand Down
10 changes: 5 additions & 5 deletions mozjs-sys/src/jsglue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,28 +61,28 @@ class RustJobQueue : public JS::JobQueue {
RustJobQueue(const JobQueueTraps& aTraps, const void* aQueue)
: mTraps(aTraps), mQueue(aQueue) {}

virtual JSObject* getIncumbentGlobal(JSContext* cx) {
virtual JSObject* getIncumbentGlobal(JSContext* cx) override {
return mTraps.getIncumbentGlobal(mQueue, cx);
}

virtual bool enqueuePromiseJob(JSContext* cx, JS::HandleObject promise,
JS::HandleObject job,
JS::HandleObject allocationSite,
JS::HandleObject incumbentGlobal) {
JS::HandleObject incumbentGlobal) override {
return mTraps.enqueuePromiseJob(mQueue, cx, promise, job, allocationSite,
incumbentGlobal);
}

virtual bool empty() const { return mTraps.empty(mQueue); }
virtual bool empty() const override { return mTraps.empty(mQueue); }

virtual void runJobs(JSContext* cx) {
virtual void runJobs(JSContext* cx) override {
MOZ_ASSERT(false, "runJobs should not be invoked");
}

bool isDrainingStopped() const override { return false; }

private:
virtual js::UniquePtr<SavedJobQueue> saveJobQueue(JSContext* cx) {
virtual js::UniquePtr<SavedJobQueue> saveJobQueue(JSContext* cx) override {
MOZ_ASSERT(false, "saveJobQueue should not be invoked");
return nullptr;
}
Expand Down

0 comments on commit f68e385

Please sign in to comment.