-
-
Notifications
You must be signed in to change notification settings - Fork 136
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feature/v8 10.3.22 perf #1743
Merged
Merged
feature/v8 10.3.22 perf #1743
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…nd use this converter again tempporarily
* wip: timers * wip: add try catch * wip: optimizations and edge cases * chore: missing cmakelists * test: add timer tests
* feat: settings.gradle plugin (#1731) * chore: bump compile sdk Co-authored-by: Ammar Ahmed <40239442+ammarahm-ed@users.noreply.github.com>
…older It's clearer that these files are part of NativeScript if they live in the same folder as the other NativeScript sources. Otherwise, it's easy to overlook them when updating the V8 sources and unintentionally delete them. The classes are adjusted slightly: moved from the v8_inspector:: namespace into the tns:: namespace, and the filename casing updated to match the other NativeScript sources.
Here's a summary of what I copied from my build of v8-buildscripts: v8-buildscripts/v8/out.v8.x64/gen/src/inspector/protocol → v8_inspector/src/inspector/ v8-buildscripts/v8/third_party/inspector_protocol/crdtp/*.h → v8_inspector/third_party/inspector_protocol/crdtp/ v8-buildscripts/v8/src/inspector/*.h → v8_inspector/src/inspector/ v8-buildscripts/v8/src/inspector/inspector_protocol_config.json → v8_inspector/src/inspector/ v8-buildscripts/v8/src/base/*.h → v8_inspector/src/base/ v8-buildscripts/v8/src/base/platform/*.h → v8_inspector/src/base/platform/ v8-buildscripts/v8/out.v8.x64/gen/include/inspector → include/ v8-buildscripts/v8/src/debug/*.h → v8_inspector/src/debug/ v8-buildscripts/v8/src/common/*.h → v8_inspector/src/common/ I removed all of the remaining inspector source files not covered by the above. This is both outdated headers that are no longer part of V8, but also the .cc files - the inspector symbols in those .cc files are provided by the V8 static library already, so we don't need to recompile them.
Replaced by manually deleting the copy constructor and assignment operator. This macro has disappeared in newer V8, see V8 commit 3a888a85.
A separate V8Platform for the inspector seems to be no longer needed, because now the DefaultPlatform supports scheduling tasks.
V8 requires this, and some of the inspector sources we added in the inspector sources update will not compile without it.
I'm not sure about this, but I think the code was initializing context_ with its own initial value (i.e. nullptr), rather than the isolate's context. This seemed to trigger an error when sending a message to the frontend, which this change fixed.
It looks like this was used with a no-longer-existent V8 API, v8::debug::SetMessageHandler. There may be something similar now with isolate->AddMessageListener() but it does not receive an exception value. In any case, it's not currently used, and the commented code no longer compiles.
There was a mix of public and private members with and without underscore, and static members that got initialized in the constructor. Consolidate them all into private members, named consistently with underscore. (Moving the static members to instance members shouldn't matter much, since this class is a singleton anyway.)
The method can be made private, as well, because it's not used outside the class.
Move some methods to be private, and make the context group ID into a constexpr.
Some of the String16 APIs have been made private, so we should use the public ones instead. These are encapsulated in two inlined utility functions at the top of the file, which convert between StringView and std::string.
This saves having to type out the whole type in order to call its no-arg constructor.
This is the only remaining usage of PersistentToLocal. We don't need its capability of dealing with weak persistent references because we never call SetWeak on the context.
Uncomment the code that starts the inspector, and compile the inspector client when we are in debug mode. However, comment out the parts that don't work yet. At this point, the JsV8InspectorClient compiles, but doesn't do anything.
Console messages used to be implemented with the Log protocol, which is no longer part of V8. The Runtime protocol provides an equivalent API, Runtime.consoleAPICalled. The Runtime protocol is part of the generated public sources, but the V8 inspector's RuntimeAgent is not. So, for now, we make use of V8's private API, casting V8Inspector* to V8InspectorImpl* and V8InspectorSession* to V8InspectorSessionImpl* in order to access their methods (for which we pulled in the corresponding V8 header files in the V8 sources update, earlier on this branch.)
…d-main chore: merge main into v8-10.3.22-perf
…roid into inspector-console-log
Restore Console inspector for V8 10.3
This restores the JS functions that were used to implement the DOM and Network inspector domains. The functions do nothing, but they are present so that using the corresponding UI features in the inspector doesn't crash.
Restore DOM and Network callback handlers
edusperoni
force-pushed
the
feature/v8-10.3.22-perf
branch
from
March 24, 2023 19:58
bf6b82d
to
2d028f3
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Create a meaningful title
Description
Does your commit message include the wording below to reference a specific issue in this repo?
Related Pull Requests
Does your pull request have unit tests?