| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
| |
JSC doesn't provide a way of un-defining a getter/setter. If
deleting e.g. only the setter, we remember the getter, delete
the property, then re-establish the getter.
|
|
|
|
|
|
|
| |
The error reporting behaviour has changed a little bit in JSC regarding
the line number of the errors
Reviewed-by: Kent Hansen
|
|
|
|
|
|
|
|
|
|
|
|
| |
The test used to test that passing 0 as line number works.
There is no reason to impose the lineNumber to be >= 1, this is an
arbitrary limitation.
It even works when passing negative value, but as -1 is a magic number,
an error on line '-1' will not have lineNumber
Reviewed-by: Kent Hansen
|
|
|
|
|
|
| |
The 'this' value was not correctly set when evaluating
Reviewed-by: Kent Hansen
|
|
|
|
|
|
|
| |
The 'arguments' is not handled by JavaScriptCore for native function. We
have to do that manually
Reviewed-by: Kent Hansen
|
|
|
|
|
|
|
|
|
| |
As specified in the specification.
The QScriptEngine::newRegExp on the other hand used to work with invalid
flags.
Reviewed-by: Kent Hansen
|
|
|
|
| |
The test was wrong. The line number should be from within the eval.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
JSC requires that the global object is actually a
JSGlobalObject instance, whereas QScriptEngine::setGlobalObject()
allows any object to be set as the global object. The way we
solve this is by proxying from an internal global object to the
custom (user-set) object.
We need to take care that the internal global object is never
actually exposed through our API; a brilliantly named helper
function, toUsableValue(), makes that happen.
Evaluating "var a = 10" with a custom global object doesn't work
yet; the variable always ends up in the internal Global Object.
For variable assignments, JSC appears to bypass the normal
JSObject::put() and instead use
JSGlobalObject::copyGlobals{From,To}(), which means I can't
intercept and proxy the assignments.
This commit enough to get the Context2D example working. There's
another bug with iteration of the built-in Global Object's
properties (non-enumerable properties are always skipped by the
JSC C++ API, whereas with QScriptValueIterator they should not
be), but that's a totally separate issue.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Install custom ClientData on JSGlobalData instance instead.
Also some cleanups to avoid globalObject et al being accessed
directly.
Killed the proxying scheme employed in setGlobalObject() since it
didn't work; if you stored the original Global Object and replaced
it with another object, then added properties to the new object,
they would show up in the old object, too (because the old object
would always proxy to whatever the current Global Object was).
|
|
|
|
|
|
| |
Allows us to get a GC callback without having to create a dummy
script object that implements JSObject::mark() and calling
Heap::protect() on that one.
|
|
|
|
|
| |
Enable the tests checking the line number of exception.
Add a lower bound on the lineNumber of QScriptEngin::evaluate()
|
|
|
|
|
|
|
|
|
| |
Use the exception from JSC::exec instead of
QScriptEngin::uncaughtException.
A few more tests are passing for qscriptvalue and qscriptqobject.
Reviewed-by: Kent Hansen
|
|
|
|
|
|
|
|
| |
Fix tst_QScriptExtQObject::objectDeleted(), the exception generated
in the JSC script engine needs to be stored in uncaughtException of
QScriptEngine.
Reviewed-by: Kent Hansen
|
| |
|
|
|
|
|
|
|
|
|
|
| |
We have to set the CallFrame correctly in QScriptEngine::evaluate() in
order to ger the 'arguments' object and all the local stuff working.
The code Assert if dynamicGlobalObject is not set, so set it to the
global object.
Reviewed-by: Kent Hansen
|
| |
|
|
|
|
| |
Better than relying on a custom Global Object.
|
| |
|
| |
|
|
|
|
|
| |
No need to expose the fact that we go via the Global Object
to get an engine pointer.
|
|
|
|
|
|
|
|
| |
So the exception we get as result are the one thrown by the function.
(fix tst_QScriptEngine::newRegExp test)
Reviewed-by: Kent Hansen
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Support has been added to the JSC functions to support host functions
as well, so now we can use them directly.
|
| |
|
|
|
|
|
|
| |
Handle Exception in a toString function
Reviewed-by: Kent Hansen
|
|
|
|
|
|
|
|
| |
For matching the regular expression, the algorithm of JSCore is used
instead of QRegExp, this is done to be consistent with the rest
of ecmascript.
Reviewed-by: Kent Hansen
|
|
|
|
| |
Reviewed-by: Kent Hansen
|
|
|
|
| |
smaller pieces.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
JSC refuses to call functions when there's an exception that hasn't
been dealt with, so save the exception and restore it afterwards.
|
| |
|
| |
|
|
|
|
| |
getter
|
| |
|
|
|
|
| |
There was a bug in commit 1d56e14605d74aefb955bdd81ee4083131252c9e
|
| |
|
|
|
|
| |
D'oh, inverse logic.
|
|
|
|
|
|
|
| |
engine
Also change the stringValue not to be a pointer. This fixes a memory
leak.
|
| |
|
|
|
|
|
|
| |
as its prototype
port of commit 4182e9c4b2cbfcd0604c57da210e97d68cbbbb52 in qt/master.
|
|
|
|
|
| |
Don't add method names, only signatures.
Respect the SkipMethodsInEnumeration option.
|