Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void TestingAutomationProvider::IsPageActionVisible(
- base::DictionaryValue* args,
- IPC::Message* reply_message) {
- ....
- Browser* browser = automation_util::GetBrowserForTab(tab);
- const Extension* extension;
- if (!GetEnabledExtensionFromJSONArgs(
- ...., browser->profile(), ....)) {
- reply.SendError(error);
- return;
- }
- if (!browser) {
- reply.SendError("Tab does not belong to an open browser");
- return;
- }
- ....
- }
- This suspicious code was found in Chromium project by PVS-Studio static code analyzer.
- Warning message is:
- V595 The 'browser' pointer was utilized before it was verified against nullptr. Check lines: 5489, 5493. testing_automation_provider.cc 5489
- PVS-Studio is a static analyzer for detecting bugs in the source code of applications written in C, C++, C++11, C++/CX. Site: http://www.viva64.com/en/pvs-studio/
Advertisement
Add Comment
Please, Sign In to add comment