Bumping manifests a=b2g-bump
[gecko.git] / js / ipc / JavaScriptChild.h
blob9c377a227bb0830945574fbba915474f5997c02c
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
2 * vim: set ts=4 sw=4 et tw=80:
4 * This Source Code Form is subject to the terms of the Mozilla Public
5 * License, v. 2.0. If a copy of the MPL was not distributed with this
6 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
8 #ifndef mozilla_jsipc_JavaScriptChild_h_
9 #define mozilla_jsipc_JavaScriptChild_h_
11 #include "JavaScriptBase.h"
12 #include "mozilla/jsipc/PJavaScriptChild.h"
14 namespace mozilla {
15 namespace jsipc {
17 class JavaScriptChild : public JavaScriptBase<PJavaScriptChild>
19 public:
20 explicit JavaScriptChild(JSRuntime* rt);
21 virtual ~JavaScriptChild();
23 bool init();
24 void finalize(JSFreeOp* fop);
26 void drop(JSObject* obj);
28 protected:
29 virtual bool isParent() { return false; }
30 virtual JSObject* defaultScope() MOZ_OVERRIDE;
32 private:
33 bool fail(JSContext* cx, ReturnStatus* rs);
34 bool ok(ReturnStatus* rs);
37 } // mozilla
38 } // jsipc
40 #endif