We're just throwing an exception.  I think the issue is that the devtools
isn't giving a full stack trace when it could.  I've filed
crbug.com/28758to track (although there's probably already an upstream
webkit bug about
this somewhere).

You can find the file and line yourself by adding a try/catch around your
code and then printing out the exception detail.

Erik


On Tue, Nov 24, 2009 at 3:23 PM, Nick Baum <[email protected]> wrote:

> Is there any way we can make these errors point to the actual file & line
> where the error occurred?
>
> chrome/ExtensionProcessBindings:54 isn't very helpful...
>
> -Nick
>
>
> On Tue, Nov 24, 2009 at 2:17 PM, Erik Kay <[email protected]> wrote:
>
>> (apologies for resend)
>>
>> Your call to executeScript should use tab.id (an integer), not tab (an
>> object).
>>
>> Erik
>>
>>
>> On Tue, Nov 24, 2009 at 12:03 PM, Keithamus <[email protected]> wrote:
>>
>>> As the title suggests, I am trying to find a way to fill all of the
>>> password boxes on a page, while in a browser action. From what I can
>>> see the best way to do this is using chrome.tabs.executeScript();
>>>
>>> I'll show you my code so far:
>>>
>>> var script =
>>>                                        var script = function() {
>>>                                                var forms,i,form,n;
>>>                                                f = document.forms;
>>>                                                for(n=0; n<forms.length;
>>> ++n) {
>>>                                                        form = forms[n];
>>>                                                        for (i=0;
>>> i<form.length; ++i) {
>>>                                                                if
>>> (form[i].type.toLowerCase() == 'password') {
>>>
>>>  form[i].value=Passwd;
>>>                                                                }
>>>                                                        }
>>>                                                }
>>>                                        }
>>>
>>>
>>>  chrome.tabs.getSelected(null,function(tab) {
>>>
>>>  chrome.tabs.executeScript(tab,{code:script,allFrames:true})
>>>                                        });
>>>
>>> When I run this I get the following:
>>>
>>> Uncaught Error: Invalid value for argument 0. Expected 'integer' but
>>> got 'object'    chrome/ExtensionProcessBindings:54
>>>
>>> Which is infuriating as it tells me nothing.
>>>
>>> Am I just noobing this, or am I on the right path? If people could
>>> point me in the right direction that'd be great. Cheers
>>>
>>> --
>>>
>>> You received this message because you are subscribed to the Google Groups
>>> "Chromium-extensions" group.
>>> To post to this group, send email to
>>> [email protected].
>>> To unsubscribe from this group, send email to
>>> [email protected]<chromium-extensions%[email protected]>
>>> .
>>> For more options, visit this group at
>>> http://groups.google.com/group/chromium-extensions?hl=en.
>>>
>>>
>>>
>>  --
>> You received this message because you are subscribed to the Google Groups
>> "Chromium-extensions" group.
>> To post to this group, send email to [email protected]
>> .
>> To unsubscribe from this group, send email to
>> [email protected]<chromium-extensions%[email protected]>
>> .
>> For more options, visit this group at
>> http://groups.google.com/group/chromium-extensions?hl=en.
>>
>
>

--

You received this message because you are subscribed to the Google Groups 
"Chromium-extensions" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/chromium-extensions?hl=en.


Reply via email to