Code Monkey home page Code Monkey logo

Comments (1)

chexiongsheng avatar chexiongsheng commented on May 27, 2024

中间碰到一个d8.cc的错误引导导致实现问题,记录下:
d8.cc生成fullfil回调的逻辑如下:

#ifndef CHECK
#define CHECK(condition) assert(condition)
#endif

//...other

Local<Function> callback_success;
CHECK(Function::New(realm, ModuleResolutionSuccessCallback, edata)
    .ToLocal(&callback_success));

我照写是有问题的,因为assert在release版本直接整行都干没了,并不会执行中间的Function::New等语句,导致后续Then时空指针访问。
而d8.cc没问题是因为它在v8\src\base\logging.h另有CHECK的定义。
它这代码生效了崩溃,不生效废代码,但对参考它写代码却是错误的引导。
我先是怀疑编译参数、v8构建环境和plugin构建环境一致性的问题,排查后一行行代码替换最终找到问题所在。

from puerts.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.