WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
156632
Reduce use of Deprecated::ScriptXXX classes
https://bugs.webkit.org/show_bug.cgi?id=156632
Summary
Reduce use of Deprecated::ScriptXXX classes
Darin Adler
Reported
2016-04-15 11:40:58 PDT
Reduce use of Deprecated::ScriptXXX classes
Attachments
Patch
(100.17 KB, patch)
2016-04-15 12:35 PDT
,
Darin Adler
buildbot
: commit-queue-
Details
Formatted Diff
Diff
Archive of layout-test-results from ews103 for mac-yosemite
(1.23 MB, application/zip)
2016-04-15 13:13 PDT
,
Build Bot
no flags
Details
Archive of layout-test-results from ews104 for mac-yosemite-wk2
(1.08 MB, application/zip)
2016-04-15 13:13 PDT
,
Build Bot
no flags
Details
Archive of layout-test-results from ews114 for mac-yosemite
(1.04 MB, application/zip)
2016-04-15 13:28 PDT
,
Build Bot
no flags
Details
Archive of layout-test-results from ews123 for ios-simulator-wk2
(619.95 KB, application/zip)
2016-04-15 13:33 PDT
,
Build Bot
no flags
Details
Patch
(100.75 KB, patch)
2016-04-15 14:36 PDT
,
Darin Adler
achristensen
: review+
Details
Formatted Diff
Diff
Show Obsolete
(5)
View All
Add attachment
proposed patch, testcase, etc.
Darin Adler
Comment 1
2016-04-15 12:35:45 PDT
Created
attachment 276494
[details]
Patch
Darin Adler
Comment 2
2016-04-15 13:10:04 PDT
Looks like I missed a null check somewhere.
Build Bot
Comment 3
2016-04-15 13:13:02 PDT
Comment on
attachment 276494
[details]
Patch
Attachment 276494
[details]
did not pass mac-ews (mac): Output:
http://webkit-queues.webkit.org/results/1164770
New failing tests: fast/dom/javascript-url-exception-isolation.html fast/frames/sandboxed-iframe-scripting-03.html
Build Bot
Comment 4
2016-04-15 13:13:04 PDT
Created
attachment 276499
[details]
Archive of layout-test-results from ews103 for mac-yosemite The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews103 Port: mac-yosemite Platform: Mac OS X 10.10.5
Build Bot
Comment 5
2016-04-15 13:13:14 PDT
Comment on
attachment 276494
[details]
Patch
Attachment 276494
[details]
did not pass mac-wk2-ews (mac-wk2): Output:
http://webkit-queues.webkit.org/results/1164765
New failing tests: fast/dom/javascript-url-exception-isolation.html fast/frames/sandboxed-iframe-scripting-03.html
Build Bot
Comment 6
2016-04-15 13:13:17 PDT
Created
attachment 276500
[details]
Archive of layout-test-results from ews104 for mac-yosemite-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews104 Port: mac-yosemite-wk2 Platform: Mac OS X 10.10.5
Build Bot
Comment 7
2016-04-15 13:28:14 PDT
Comment on
attachment 276494
[details]
Patch
Attachment 276494
[details]
did not pass mac-debug-ews (mac): Output:
http://webkit-queues.webkit.org/results/1164777
New failing tests: fast/dom/javascript-url-exception-isolation.html fast/frames/sandboxed-iframe-scripting-03.html
Build Bot
Comment 8
2016-04-15 13:28:17 PDT
Created
attachment 276502
[details]
Archive of layout-test-results from ews114 for mac-yosemite The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews114 Port: mac-yosemite Platform: Mac OS X 10.10.5
Build Bot
Comment 9
2016-04-15 13:33:27 PDT
Comment on
attachment 276494
[details]
Patch
Attachment 276494
[details]
did not pass ios-sim-ews (ios-simulator-wk2): Output:
http://webkit-queues.webkit.org/results/1164830
New failing tests: fast/dom/javascript-url-exception-isolation.html fast/frames/sandboxed-iframe-scripting-03.html
Build Bot
Comment 10
2016-04-15 13:33:30 PDT
Created
attachment 276503
[details]
Archive of layout-test-results from ews123 for ios-simulator-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews123 Port: ios-simulator-wk2 Platform: Mac OS X 10.10.5
Darin Adler
Comment 11
2016-04-15 14:36:22 PDT
Created
attachment 276514
[details]
Patch
Alex Christensen
Comment 12
2016-04-15 16:32:05 PDT
Comment on
attachment 276514
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=276514&action=review
> Source/JavaScriptCore/bindings/ScriptValue.cpp:169 > RefPtr<InspectorValue> ScriptValue::toInspectorValue(ExecState* scriptState) const > { > JSLockHolder holder(scriptState); > - return jsToInspectorValue(scriptState, m_value.get(), InspectorValue::maxDepth); > + return jsToInspectorValue(*scriptState, m_value.get(), InspectorValue::maxDepth); > }
There are a lot of places where ExecStates and VMs are passed around as pointers that are assumed to be non-null. Why don't we use more ExecState&?
> Source/WebKit2/WebProcess/WebPage/WebInspectorUI.cpp:87 > - ScriptGlobalObject::set(execStateFromPage(mainThreadNormalWorld(), m_page.corePage()), ASCIILiteral("InspectorFrontendHost"), m_frontendHost.get()); > + ScriptGlobalObject::set(*execStateFromPage(mainThreadNormalWorld(), m_page.corePage()), ASCIILiteral("InspectorFrontendHost"), *m_frontendHost);
This will be dereferencing a null pointer if corePage() returns null.
Darin Adler
Comment 13
2016-04-15 19:25:45 PDT
Committed
r199619
: <
http://trac.webkit.org/changeset/199619
>
Darin Adler
Comment 14
2016-04-15 19:27:28 PDT
Comment on
attachment 276514
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=276514&action=review
>> Source/JavaScriptCore/bindings/ScriptValue.cpp:169 >> } > > There are a lot of places where ExecStates and VMs are passed around as pointers that are assumed to be non-null. Why don't we use more ExecState&?
Yes, there are. We should use more ExecState&. It takes a long time to change all the old code.
>> Source/WebKit2/WebProcess/WebPage/WebInspectorUI.cpp:87 >> + ScriptGlobalObject::set(*execStateFromPage(mainThreadNormalWorld(), m_page.corePage()), ASCIILiteral("InspectorFrontendHost"), *m_frontendHost); > > This will be dereferencing a null pointer if corePage() returns null.
Yes, was true before, the dereferencing was inside ScriptGlobalObject::set, and it is equally true now.
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