Disposing the isolate that is entered by a thread
如圖,如果把花括號注釋掉,運行會報錯:
Fatal error in v8::Isolate::Dispose() Disposing the isolate that is entered by a thread.

企業(yè)微信截圖_17271687337294.png

企業(yè)微信截圖_17271687875695.png
原因和作用域有關(guān),看下圖:
v8::Isolate::Scope
image.png
void Isolate::Enter

image.png
Isolate::Dispose
image.png
Fatal signal 4 (SIGILL), code 2 (ILL_ILLOPN), fault addr 0x7472705dfd00 in tid xxx
如圖,函數(shù)定義了返回值類型void*,但是沒有返回值,導(dǎo)致報錯:
Fatal signal 4 (SIGILL), code 2 (ILL_ILLOPN), fault addr 0x7472705dfd00 in tid xxx

image.png