WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
107674
[V8] Reduce usage of deprecatedV8String() and deprecatedV8Integer()
https://bugs.webkit.org/show_bug.cgi?id=107674
Summary
[V8] Reduce usage of deprecatedV8String() and deprecatedV8Integer()
Kentaro Hara
Reported
2013-01-23 05:14:30 PST
A bit more work is needed to kill them completely.
Attachments
Patch
(22.10 KB, patch)
2013-01-23 05:15 PST
,
Kentaro Hara
no flags
Details
Formatted Diff
Diff
Patch
(2.00 KB, patch)
2013-01-30 05:04 PST
,
Kentaro Hara
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Kentaro Hara
Comment 1
2013-01-23 05:15:48 PST
Created
attachment 184206
[details]
Patch
WebKit Review Bot
Comment 2
2013-01-23 16:31:29 PST
Comment on
attachment 184206
[details]
Patch Clearing flags on attachment: 184206 Committed
r140611
: <
http://trac.webkit.org/changeset/140611
>
WebKit Review Bot
Comment 3
2013-01-23 16:31:33 PST
All reviewed patches have been landed. Closing bug.
Eugene Klyuchnikov
Comment 4
2013-01-28 03:36:36 PST
(In reply to
comment #3
)
> All reviewed patches have been landed. Closing bug.
This patch causes REGRESSION: CPU profile can't be recorded from WebInspector. More precisely: in file ScriptProfiler.cpp it is explicitly declared that "start" and "stop" could be invoked with state == 0 (see "startForPage", "stopForPage", etc.) Accessing "isolate" of a null pointer causes crashes.
Kentaro Hara
Comment 5
2013-01-28 05:57:24 PST
(In reply to
comment #4
)
> This patch causes REGRESSION: CPU profile can't be recorded from WebInspector.
oops, sorry. Let me take a look tomorrow morning.
Kentaro Hara
Comment 6
2013-01-30 05:04:55 PST
Reopening to attach new patch.
Kentaro Hara
Comment 7
2013-01-30 05:04:59 PST
Created
attachment 185469
[details]
Patch
Kentaro Hara
Comment 8
2013-01-30 05:08:41 PST
(In reply to
comment #4
)
> (In reply to
comment #3
) > > All reviewed patches have been landed. Closing bug. > > This patch causes REGRESSION: CPU profile can't be recorded from WebInspector. > > More precisely: in file ScriptProfiler.cpp it is explicitly declared that "start" and "stop" could be invoked with state == 0 (see "startForPage", "stopForPage", etc.) > Accessing "isolate" of a null pointer causes crashes.
Thanks for fixing the crash by passing Isolate::GetCurrent(). I uploaded a follow-up patch that uses state->isolate() when state is not 0. (In the future, I think InspectorProfilerAgent should keep ScriptState* and pass it to bindings.) abarth: review?
Adam Barth
Comment 9
2013-01-30 11:57:00 PST
Comment on
attachment 185469
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=185469&action=review
> Source/WebCore/bindings/v8/ScriptProfiler.cpp:62 > - v8::CpuProfiler::StartProfiling(v8String(title, v8::Isolate::GetCurrent())); > + v8::CpuProfiler::StartProfiling(v8String(title, state ? state->isolate() : v8::Isolate::GetCurrent()));
So state can be zero here but not in stop() ?
Kentaro Hara
Comment 10
2013-01-30 20:17:13 PST
Comment on
attachment 185469
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=185469&action=review
>> Source/WebCore/bindings/v8/ScriptProfiler.cpp:62 >> + v8::CpuProfiler::StartProfiling(v8String(title, state ? state->isolate() : v8::Isolate::GetCurrent())); > > So state can be zero here but not in stop() ?
state can be zero in stop(), but it's OK.
> Source/WebCore/bindings/v8/ScriptProfiler.cpp:81 > const v8::CpuProfile* profile = state ? > - v8::CpuProfiler::StopProfiling(v8String(title, v8::Isolate::GetCurrent()), state->context()->GetSecurityToken()) : > + v8::CpuProfiler::StopProfiling(v8String(title, state->isolate()), state->context()->GetSecurityToken()) :
because we're checking state here.
WebKit Review Bot
Comment 11
2013-01-30 20:33:53 PST
Comment on
attachment 185469
[details]
Patch Clearing flags on attachment: 185469 Committed
r141368
: <
http://trac.webkit.org/changeset/141368
>
WebKit Review Bot
Comment 12
2013-01-30 20:33:57 PST
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug