WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
117825
REGRESSION (
r150663
): Using webkitAudioContext in Inspector makes it undefined everywhere
https://bugs.webkit.org/show_bug.cgi?id=117825
Summary
REGRESSION (r150663): Using webkitAudioContext in Inspector makes it undefine...
Sindre Aa
Reported
2013-06-20 01:21:37 PDT
For the last week or more, webkitAudioContext is not set. Inspector autocompletes the name, but still returns undefined:
> webkitAudioContext
< undefined
> new webkitAudioContext
< TypeError: 'undefined' is not a constructor (evaluating 'new webkitAudioContext') offlineAudioContext seems to work:
> webkitOfflineAudioContext
< webkitOfflineAudioContextConstructor I always end up reverting to
r150366
, in which Web Audio is working. There were quite a few builds after this that created horrible popping/scratching noises when initializing the audio context, and now it is simply not defined. I can reproduce it on any page. Just open the console on the welcome-screen when opening the fresh install (
r151760
) and try to create a context. I have tried restarting the browser. Not sure if I have restarted the mac after installing, so I could try that as well.
Attachments
roll out
(32.52 KB, patch)
2013-06-20 14:05 PDT
,
Chris Dumez
eflews.bot
: commit-queue-
Details
Formatted Diff
Diff
Patch
(30.85 KB, patch)
2013-06-20 15:34 PDT
,
Chris Dumez
haraken
: review+
gtk-ews
: commit-queue-
Details
Formatted Diff
Diff
JSDOMWindow.cpp diff
(3.44 KB, patch)
2013-06-20 16:08 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Patch for landing
(31.18 KB, patch)
2013-06-21 00:21 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Alexey Proskuryakov
Comment 1
2013-06-20 09:54:58 PDT
Regressed in <
http://trac.webkit.org/changeset/150663
>. What I'm observing is that webkitAudioContext works in a document until I try to access it from Web Inspector, at which time it disappears from the document too. Unsure if this is limited to webkitAudioContext, or a more widespread problem.
Alexey Proskuryakov
Comment 2
2013-06-20 09:56:45 PDT
<
rdar://problem/14217549
>
Chris Dumez
Comment 3
2013-06-20 12:07:26 PDT
new webkitAudioContext(); works in WebInspector for WebKit2 EFL. window.webkitAudioContext is not undefined either. I'm looking into the issue but it is likely to be a setting problem if it works on EFL but not mac port. The constructor is enabled at runtime via RuntimeEnabledSettings.
Chris Dumez
Comment 4
2013-06-20 12:10:34 PDT
RuntimeEnabledFeatures::webkitAudioContextEnabled() is called to check if the constructor should be enabled at runtime. It returns true if the WebAudio setting is enabled.
Chris Dumez
Comment 5
2013-06-20 12:54:16 PDT
One difference in behavior after the patch is that WebAudio used to be a per-PageGroup preference. Now, it is a global preference because it is part of RuntimeEnabledFeatures. It is possible that the WebAudio setting get disabled somehow when the Safari Web Inspector is showed? This would explain why the constructor would disappear from the document when the inspector is used.
Alexey Proskuryakov
Comment 6
2013-06-20 13:23:09 PDT
Yes, Web Inspector does not enable WebAudio (why would it?). Clients should be free to apply different settings to multiple PageGroups. The idea of PageGroups is that there are entirely separate, with code creating each not necessarily aware that there are others.
Chris Dumez
Comment 7
2013-06-20 13:41:43 PDT
(In reply to
comment #6
)
> Yes, Web Inspector does not enable WebAudio (why would it?).
So the webkitAudioContext constructor should not be exposed in the Web inspector, right?
> > Clients should be free to apply different settings to multiple PageGroups. The idea of PageGroups is that there are entirely separate, with code creating each not necessarily aware that there are others.
I understand, I wasn't sure of the value of having WebAudio support at pagegroup level. But I understand this is confusing in the current state. For the record, I this is not the only setting behaving like this. I followed the model of CSSRegions and CSSCompositing. I guess I will roll out. We would need support in the JSC bindings generator for something similar to [EnabledAtRuntime] but using Settings instead of RuntimeEnabledFeatures.
Alexey Proskuryakov
Comment 8
2013-06-20 13:56:45 PDT
> So the webkitAudioContext constructor should not be exposed in the Web inspector, right?
Probably not to Web Inspector code (unless there is a specific reason to need it, in which Web Inspector will opt into it). Should obviously be exposed in Web Inspector console, as that runs in the context of the inspected page.
> I followed the model of CSSRegions and CSSCompositing
So, the same issue exists for these? That's quite unfortunate :(
Chris Dumez
Comment 9
2013-06-20 14:05:15 PDT
Created
attachment 205120
[details]
roll out
EFL EWS Bot
Comment 10
2013-06-20 14:15:27 PDT
Comment on
attachment 205120
[details]
roll out
Attachment 205120
[details]
did not pass efl-ews (efl): Output:
http://webkit-queues.appspot.com/results/858693
Chris Dumez
Comment 11
2013-06-20 14:19:02 PDT
(In reply to
comment #8
)
> > So the webkitAudioContext constructor should not be exposed in the Web inspector, right? > > Probably not to Web Inspector code (unless there is a specific reason to need it, in which Web Inspector will opt into it). > > Should obviously be exposed in Web Inspector console, as that runs in the context of the inspected page. > > > I followed the model of CSSRegions and CSSCompositing > > So, the same issue exists for these? That's quite unfortunate :(
They may not have exactly the same issue, it depends if their constructor is actually enabled at runtime. However, their WebKit2 setting is linked to a global boolean in RuntimeEnabledFeatures:
http://trac.webkit.org/browser/trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp#L2490
http://trac.webkit.org/browser/trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp#L2491
So changing these settings would affect all page groups.
Build Bot
Comment 12
2013-06-20 14:19:13 PDT
Comment on
attachment 205120
[details]
roll out
Attachment 205120
[details]
did not pass mac-wk2-ews (mac-wk2): Output:
http://webkit-queues.appspot.com/results/956138
EFL EWS Bot
Comment 13
2013-06-20 14:19:49 PDT
Comment on
attachment 205120
[details]
roll out
Attachment 205120
[details]
did not pass efl-wk2-ews (efl-wk2): Output:
http://webkit-queues.appspot.com/results/937394
Chris Dumez
Comment 14
2013-06-20 14:27:19 PDT
Ok, rolling it out is not easy but I am working on it :)
Build Bot
Comment 15
2013-06-20 14:54:47 PDT
Comment on
attachment 205120
[details]
roll out
Attachment 205120
[details]
did not pass mac-ews (mac): Output:
http://webkit-queues.appspot.com/results/857654
Chris Dumez
Comment 16
2013-06-20 15:34:48 PDT
Created
attachment 205126
[details]
Patch
Chris Dumez
Comment 17
2013-06-20 16:08:42 PDT
Created
attachment 205127
[details]
JSDOMWindow.cpp diff
Kentaro Hara
Comment 18
2013-06-20 16:41:40 PDT
Comment on
attachment 205126
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=205126&action=review
> Source/WebCore/ChangeLog:9 > + RuntimeEnabledFeatures.
Would it be hard to change WebAudio so that it uses RuntimeEnabledFeatures?
Kentaro Hara
Comment 19
2013-06-20 16:43:40 PDT
Comment on
attachment 205126
[details]
Patch For the time being, I'll r+ it as this CL is a reasonable revert for
r150663
, which caused the regression. However, we might want to invent a cleaner solution (e.g. WebAudio should use RuntimeEnabledFeatures).
kov's GTK+ EWS bot
Comment 20
2013-06-20 20:44:02 PDT
Comment on
attachment 205126
[details]
Patch
Attachment 205126
[details]
did not pass gtk-ews (gtk): Output:
http://webkit-queues.appspot.com/results/918432
Sindre Aa
Comment 21
2013-06-20 23:48:28 PDT
By the way, the reason I discovered this was not because it was not found through the inspector, but because my project (which uses webAudio) failed to create the webkitAudioContext. It might be because the inspector was open at the same time, in another tab? Now (still on the same build) it seems to work occasionally (not consistently). Sometimes I need to refresh the page and close other tabs to get it working again.
Chris Dumez
Comment 22
2013-06-21 00:21:49 PDT
Created
attachment 205155
[details]
Patch for landing
Kentaro Hara
Comment 23
2013-06-21 00:23:02 PDT
Comment on
attachment 205155
[details]
Patch for landing Looks OK as an immediate fix for the regression, though we might want to invent a cleaner solution.
Chris Dumez
Comment 24
2013-06-21 00:30:32 PDT
(In reply to
comment #19
)
> (From update of
attachment 205126
[details]
) > For the time being, I'll r+ it as this CL is a reasonable revert for
r150663
, which caused the regression. However, we might want to invent a cleaner solution (e.g. WebAudio should use RuntimeEnabledFeatures).
Do we really want to use RuntimeEnabledFeatures to enable features at runtime? What is the issue with using Settings? I was thinking that we might want to get rid of RuntimeEnabledFeatures class (Which is barely used at the moment) and use Settings instead?
Kentaro Hara
Comment 25
2013-06-21 00:48:51 PDT
(In reply to
comment #24
)
> Do we really want to use RuntimeEnabledFeatures to enable features at runtime? What is the issue with using Settings? > > I was thinking that we might want to get rid of RuntimeEnabledFeatures class (Which is barely used at the moment) and use Settings instead?
Sorry for not being clear (I was confused a bit). My point is that it is nasty that (1) we have both [EnabledAtRuntime] and [EnabledBySettings] and that (2) RuntimeEnabledFeatures.h is hand-written. So replacing RuntimeEnabledFeatures with Settings sounds like a reasonable approach.
WebKit Commit Bot
Comment 26
2013-06-21 03:35:23 PDT
Comment on
attachment 205155
[details]
Patch for landing Clearing flags on attachment: 205155 Committed
r151832
: <
http://trac.webkit.org/changeset/151832
>
WebKit Commit Bot
Comment 27
2013-06-21 03:35:28 PDT
All reviewed patches have been landed. Closing bug.
Geoffrey Garen
Comment 28
2013-06-21 09:19:58 PDT
> I was thinking that we might want to get rid of RuntimeEnabledFeatures class (Which is barely used at the moment) and use Settings instead?
+1
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