Skip to content
This repository has been archived by the owner on Mar 29, 2024. It is now read-only.

Cleanups, optimizations and fixes

Compare
Choose a tag to compare
@pinepain pinepain released this 05 Mar 20:51
· 202 commits to master since this release

This release adds low-level optimizations, simplify some internal methods and fix few bugs. For more details see change list below.

As of this release, V8 >= 5.9.5 required.

* - BC-breaking or potentially BC-breaking changes

Changes to public API and other important changes which may affect end-user:

  • * Replace V8\Isolate::GetCurrentContext with V8\Isolate::GetEnteredContext();
  • * Remove V8\ObjectValue::CreationContext(), use V8\ObjectValue::GetContext();
  • Add V8\PropertyCallbackInfo::ShouldThrowOnError() method;
  • Add V8\FunctionCallbackInfo::NewTarget() method;
  • V8\ReturnValue now explicitly holds isolate and context which could be accessed outside of calling context, though ReturnValue::{Get,Set} could be accessed only within calling context as before;
  • Fix potential problems with V8\FunctionCallbackInfo and V8\PropertyCallbackInfo, now they are fully build, properly stores owning isolate and context and could be safely used outside calling scope;
  • Fix leak when V8\ScriptCompiler::CompileFunctionInContext() invoked with arguments or arguments and context extensions;
  • Fix segfault under when abruptly exiting (die(), exit(), uncaught exception) from isolate which entered multiple time or from multiple nested isolates (quite rare use case).
  • Add V8\Exceptions\ValueException to stubs. It support was in extension for ages but for some reason it was missed from stubs.
  • Remove $global_template and $global_object private props from V8\Context. They were never exposed to end-user anyway.