1 #ifndef __DALI_V8PLUGIN_MODULE_H__
2 #define __DALI_V8PLUGIN_MODULE_H__
5 * Copyright (c) 2015 Samsung Electronics Co., Ltd.
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
41 Module(const std::string& path,
42 const std::string& fileName,
43 const std::string& moduleName,
46 v8::Local<v8::Object>& exportsObject);
50 std::string mFileName;
52 std::string mModuleName;
56 * holds the exports object
57 * e.g. exports.hello = function() {" hello world"}
59 v8::Persistent<v8::Object> mExportsObject;
62 * Currently we allow the modules context to be released after it has been
63 * compiled and run ( so we don't need to store it).
64 * Data is shared between contexts which suggests
65 * the module exports object can be kept alive if the context it was created in is deleted.
66 * If this is not the case, then start to store the context.
68 // v8::Persistent<v8::Context> mContext.
74 Module( const Module& ); ///< undefined copy constructor
75 Module& operator=( const Module& ); ///< undefined assignment operator
81 } // namespace V8Plugin
85 #endif // header MODULE_LOADER