diff --git a/ecmascript/compiler/aot_file/elf_checker.cpp b/ecmascript/compiler/aot_file/elf_checker.cpp index acb13d92a6..72cd091b90 100644 --- a/ecmascript/compiler/aot_file/elf_checker.cpp +++ b/ecmascript/compiler/aot_file/elf_checker.cpp @@ -13,6 +13,7 @@ * limitations under the License. */ #include "ecmascript/compiler/aot_file/elf_checker.h" +#include "ecmascript/platform/file.h" #include #include @@ -88,6 +89,9 @@ ElfChecker::ElfChecker(const void* data, int len) : elfLen_(len), elfErrorCode_( ElfChecker::ElfChecker(const std::string& path) : elfErrorCode_(0), fromMmap_(false) { + if (!panda::ecmascript::FileExist(path.c_str())) { + return; + } std::ifstream file(path, std::ios::binary | std::ios::ate); if (file.is_open() == false) { elfData_ = nullptr; diff --git a/ecmascript/extractortool/src/extractor.cpp b/ecmascript/extractortool/src/extractor.cpp index 3ea2659439..6ec042676c 100644 --- a/ecmascript/extractortool/src/extractor.cpp +++ b/ecmascript/extractortool/src/extractor.cpp @@ -20,6 +20,7 @@ #include "constants.h" #include "file_path_utils.h" #include "securec.h" +#include "ecmascript/platform/file.h" namespace panda { namespace ecmascript { @@ -110,6 +111,9 @@ bool Extractor::ExtractByName(const std::string &fileName, std::ostream &dest) c bool Extractor::ExtractFile(const std::string &fileName, const std::string &targetPath) const { + if (!panda::ecmascript::FileExist(targetPath.c_str())) { + return false; + } std::ofstream fileStream; fileStream.open(targetPath, std::ios_base::out | std::ios_base::binary); if (!fileStream.is_open()) { diff --git a/ecmascript/interpreter/interpreter.cpp b/ecmascript/interpreter/interpreter.cpp index 97bb88c1be..07a3c783c8 100644 --- a/ecmascript/interpreter/interpreter.cpp +++ b/ecmascript/interpreter/interpreter.cpp @@ -114,7 +114,7 @@ EcmaRuntimeCallInfo* EcmaInterpreter::ReBuildRuntimeCallInfo(JSThread *thread, E *(--currentSp) = thisObj.GetRawData(); *(--currentSp) = newTarget.GetRawData(); *(--currentSp) = func.GetRawData(); - *(--currentSp) = numArgs + NUM_MANDATORY_JSFUNC_ARGS; + *(--currentSp) = numArgs + static_cast(NUM_MANDATORY_JSFUNC_ARGS); *(--currentSp) = ToUintPtr(thread); EcmaRuntimeCallInfo *ecmaRuntimeCallInfo = reinterpret_cast(currentSp); diff --git a/tools/circuit_viewer/src/engine/control/XScroll.js b/tools/circuit_viewer/src/engine/control/XScroll.js index 5d90e17dfd..fefcbec963 100644 --- a/tools/circuit_viewer/src/engine/control/XScroll.js +++ b/tools/circuit_viewer/src/engine/control/XScroll.js @@ -148,4 +148,4 @@ class XScroll { module.exports = { XScroll -} \ No newline at end of file +}; \ No newline at end of file diff --git a/tools/circuit_viewer/src/ir/IrViewer.js b/tools/circuit_viewer/src/ir/IrViewer.js index fb4a074f86..6f1680ebd9 100644 --- a/tools/circuit_viewer/src/ir/IrViewer.js +++ b/tools/circuit_viewer/src/ir/IrViewer.js @@ -917,7 +917,7 @@ class IrViewer { } } }, this.findNext.bind(this)); - } + }; CanvasInput.SetSafeArea(...this.searchInput.pos); this.searchInput.Open(); } diff --git a/tools/circuit_viewer/webpack.debug.config.js b/tools/circuit_viewer/webpack.debug.config.js index e370b7cada..73111eebcb 100644 --- a/tools/circuit_viewer/webpack.debug.config.js +++ b/tools/circuit_viewer/webpack.debug.config.js @@ -23,4 +23,4 @@ module.exports = { path: path.join(__dirname, 'dist'), filename: 'main.js' } -} \ No newline at end of file +};