• Camillo Bruni's avatar
    [api] Deprecate v8::ScriptCompiler::CompileFunctionInContext · 78387ca7
    Camillo Bruni authored
    - Introduce v8::ScriptCompiler::CompileFunction
    - Deprecate v8::ScriptCompiler::CompileFunctionInContext
    - Add v8::Function::GetUnboundScript
    - Add v8::Script::GetResourceName
    
    The ScriptOrModule out-parameter is only used by NodeJS since we don't
    allow arbitrary objects has host-defined options and they need a way to
    keep the options alive.
    
    This CL deprecates the out-parameter and adds helper methods to
    address the most common use-cases.
    
    The final fix still requires more fundamental changes on how host-defined
    options are handled.
    
    Bug: chromium:1244145
    Change-Id: Id29de53521ad626c41391b8300146ee37a1b8a51
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3245117Reviewed-by: 's avatarVictor Gomes <victorgomes@chromium.org>
    Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
    Commit-Queue: Jakob Gruber <jgruber@chromium.org>
    Auto-Submit: Camillo Bruni <cbruni@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#77564}
    78387ca7
v8-script.h 26 KB