[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
rjw
rjw at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 08:19:24 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit f555250e5fa3e08ada191e822523809303116c9b
Author: rjw <rjw at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Dec 16 21:19:03 2003 +0000
Ack! More assertions. Lock ALL entry points into the interpreter!
(3511733).
Reviewed by Ken.
* bindings/jni_jsobject.cpp:
(Bindings::JSObject::call):
(Bindings::JSObject::eval):
(Bindings::JSObject::getMember):
(Bindings::JSObject::setMember):
(Bindings::JSObject::removeMember):
(Bindings::JSObject::getSlot):
(Bindings::JSObject::setSlot):
(Bindings::JSObject::convertJObjectToValue):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@5806 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/JavaScriptCore/ChangeLog b/JavaScriptCore/ChangeLog
index 611d2c8..5becf44 100644
--- a/JavaScriptCore/ChangeLog
+++ b/JavaScriptCore/ChangeLog
@@ -1,3 +1,20 @@
+2003-12-16 Richard Williamson <rjw at apple.com>
+
+ Ack! More assertions. Lock ALL entry points into the interpreter!
+ (3511733).
+
+ Reviewed by Ken.
+
+ * bindings/jni_jsobject.cpp:
+ (Bindings::JSObject::call):
+ (Bindings::JSObject::eval):
+ (Bindings::JSObject::getMember):
+ (Bindings::JSObject::setMember):
+ (Bindings::JSObject::removeMember):
+ (Bindings::JSObject::getSlot):
+ (Bindings::JSObject::setSlot):
+ (Bindings::JSObject::convertJObjectToValue):
+
2003-12-15 Richard Williamson <rjw at apple.com>
Fixed a couple of snafus and removed some logging.
diff --git a/JavaScriptCore/bindings/jni_jsobject.cpp b/JavaScriptCore/bindings/jni_jsobject.cpp
index d0f3ab4..b05fb90 100644
--- a/JavaScriptCore/bindings/jni_jsobject.cpp
+++ b/JavaScriptCore/bindings/jni_jsobject.cpp
@@ -426,7 +426,9 @@ jobject JSObject::call(jstring methodName, jobjectArray args) const
// Lookup the function object.
ExecState *exec = _root->interpreter()->globalExec();
+ Interpreter::lock();
Value func = _imp->get (exec, Identifier (JavaString(methodName).ustring()));
+ Interpreter::unlock();
if (func.isNull() || func.type() == UndefinedType) {
// Maybe throw an exception here?
return 0;
@@ -436,7 +438,9 @@ jobject JSObject::call(jstring methodName, jobjectArray args) const
ObjectImp *funcImp = static_cast<ObjectImp*>(func.imp());
Object thisObj = Object(const_cast<ObjectImp*>(_imp));
List argList = listFromJArray(args);
+ Interpreter::lock();
Value result = funcImp->call (exec, thisObj, argList);
+ Interpreter::unlock();
// Convert and return the result of the function call.
return convertValueToJObject (result);
@@ -447,7 +451,9 @@ jobject JSObject::eval(jstring script) const
JS_LOG ("script = %s\n", JavaString(script).characters());
Object thisObj = Object(const_cast<ObjectImp*>(_imp));
+ Interpreter::lock();
KJS::Value result = _root->interpreter()->evaluate(JavaString(script).ustring(),thisObj).value();
+ Interpreter::unlock();
return convertValueToJObject (result);
}
@@ -457,9 +463,9 @@ jobject JSObject::getMember(jstring memberName) const
ExecState *exec = _root->interpreter()->globalExec();
- _root->interpreter()->lock();
+ Interpreter::lock();
Value result = _imp->get (exec, Identifier (JavaString(memberName).ustring()));
- _root->interpreter()->unlock();
+ Interpreter::unlock();
return convertValueToJObject (result);
}
@@ -468,7 +474,9 @@ void JSObject::setMember(jstring memberName, jobject value) const
{
JS_LOG ("memberName = %s, value = %p\n", JavaString(memberName).characters(), value);
ExecState *exec = _root->interpreter()->globalExec();
+ Interpreter::lock();
_imp->put (exec, Identifier (JavaString(memberName).ustring()), convertJObjectToValue(value));
+ Interpreter::unlock();
}
@@ -477,7 +485,9 @@ void JSObject::removeMember(jstring memberName) const
JS_LOG ("memberName = %s\n", JavaString(memberName).characters());
ExecState *exec = _root->interpreter()->globalExec();
+ Interpreter::lock();
_imp->deleteProperty (exec, Identifier (JavaString(memberName).ustring()));
+ Interpreter::unlock();
}
@@ -486,9 +496,9 @@ jobject JSObject::getSlot(jint index) const
JS_LOG ("index = %d\n", index);
ExecState *exec = _root->interpreter()->globalExec();
- _root->interpreter()->lock();
+ Interpreter::lock();
Value result = _imp->get (exec, (unsigned)index);
- _root->interpreter()->unlock();
+ Interpreter::unlock();
return convertValueToJObject (result);
}
@@ -499,7 +509,9 @@ void JSObject::setSlot(jint index, jobject value) const
JS_LOG ("index = %d, value = %p\n", index, value);
ExecState *exec = _root->interpreter()->globalExec();
+ Interpreter::lock();
_imp->put (exec, (unsigned)index, convertJObjectToValue(value));
+ Interpreter::unlock();
}
@@ -649,9 +661,9 @@ KJS::Value JSObject::convertJObjectToValue (jobject theObject) const
return KJS::Object(const_cast<KJS::ObjectImp*>(imp));
}
- _root->interpreter()->lock();
+ Interpreter::lock();
KJS::RuntimeObjectImp *newImp = new KJS::RuntimeObjectImp(new Bindings::JavaInstance (theObject));
- _root->interpreter()->unlock();
+ Interpreter::unlock();
return KJS::Object(newImp);
}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list