[Webkit-unassigned] [Bug 15980] JSCustomSQLTransactionCallback incorrectly converts exception values toObject without checking first.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Jul 20 01:47:46 PDT 2008


https://bugs.webkit.org/show_bug.cgi?id=15980


oliver at apple.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |oliver at apple.com
           Keywords|                            |NeedsRadar
            Summary|Exceptions thrown from a    |JSCustomSQLTransactionCallba
                   |database callback log to the|ck incorrectly converts
                   |console as "undefined"      |exception values toObject
                   |                            |without checking first.




------- Comment #1 from oliver at apple.com  2008-07-20 01:47 PDT -------
This is caused by the database code assuming the converting a thrown primitive
object to a value will result in it becoming an object with exception
information attached (which it can't).  The guilty lines are:
131         if (exec->hadException()) {
132             JSObject* exception = exec->exception()->toObject(exec);
133             String message = exception->get(exec,
exec->propertyNames().message)->toString(exec);
134             int lineNumber = exception->get(exec, Identifier(exec,
"line"))->toInt32(exec);
135             String sourceURL = exception->get(exec, Identifier(exec,
"sourceURL"))->toString(exec);
136            
m_data->frame()->domWindow()->console()->addMessage(JSMessageSource,
ErrorMessageLevel, message, lineNumber, sourceURL);
137             exec->clearException();
138             
139             raisedException = true;
140         }

in JSCustomSQLTransactionCallback.cpp


-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list