Reviewers: Vitaly Repeshko,
Message:
Vitaly,
could you have a look and see if it is the right way to do it?
This is just a quick hack to get isolate from v8::String instance and not
from
TLS.
This quick change gets us 10% speed-up on getElementsByName in
dromaeo.com/?dom-query.
If this looks good, I'll go ahead and update other v8::String APIs.
Description:
Quick patch to see if removing TLS fetch on String API boundary gives us any
good
BUG=
TEST=
Please review this at http://codereview.chromium.org/6716004/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files:
M src/api.cc
Index: src/api.cc
diff --git a/src/api.cc b/src/api.cc
index
667aa60b7ef0051d1ebb77913693e84e9233bd7e..2a02887581b82ee756683bd932f179da7a82bfa0
100644
--- a/src/api.cc
+++ b/src/api.cc
@@ -4050,9 +4050,9 @@ bool v8::String::MakeExternal(
bool v8::String::CanMakeExternal() {
- i::Isolate* isolate = i::Isolate::Current();
- if (IsDeadCheck(isolate, "v8::String::CanMakeExternal()")) return false;
i::Handle<i::String> obj = Utils::OpenHandle(this);
+ i::Isolate* isolate = (*obj)->GetIsolate();
+ if (IsDeadCheck(isolate, "v8::String::CanMakeExternal()")) return false;
if (isolate->string_tracker()->IsFreshUnusedString(obj)) {
return false;
}
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev