[webkit-help] JSC How to obtain an available JSContext object in native C function

Allison Newman demallien at me.com
Mon Mar 12 07:08:36 PDT 2012


Oh dear me cupcake, that's not how you do it.

It's not clear what you are trying to do: do you want to create a Javascript function with a C body; or create a C function that calls a Javascript function? Or create a javascript function that executes javascript code?  The answer is different for each of these cases.

Allison (not a Sir...)

On Mar 12, 2012, at 07:00 AM, webkit-help-request at lists.webkit.org wrote:

Send webkit-help mailing list submissions to
webkit-help at lists.webkit.org

To subscribe or unsubscribe via the World Wide Web, visit
http://lists.webkit.org/mailman/listinfo.cgi/webkit-help
or, via email, send a message with subject or body 'help' to
webkit-help-request at lists.webkit.org

You can reach the person managing the list at
webkit-help-owner at lists.webkit.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of webkit-help digest..."


Today's Topics:

1. Re: Contributor requirements? (Alexey Proskuryakov)
2. Re: Contributor requirements? (Antonio Gomes)
3. JSC How to obtain an available JSContext object in native C
function (bins_mail at sina.com)
4. Need trunk r29940 (=?iso-8859-1?B?RmxlbW1pbmcgSC4gU/hyZW5zZW4=?=)


----------------------------------------------------------------------

Message: 1
Date: Sun, 11 Mar 2012 11:06:07 -0700
From: Alexey Proskuryakov <ap at webkit.org>
To: Ryosuke Niwa <rniwa at webkit.org>
Cc: "webkit-help at lists.webkit.org" <webkit-help at lists.webkit.org>
Subject: Re: [webkit-help] Contributor requirements?
Message-ID: <B8770765-2870-4BF4-89D4-E9507FB8DFC6 at webkit.org>
Content-Type: text/plain; charset="koi8-r"


10.03.2012, ? 23:50, Ryosuke Niwa ???????(?):

> http://www.webkit.org/team.html is a better list of contributors, which is pulled from http://trac.webkit.org/browser/trunk/Tools/Scripts/webkitpy/common/config/committers.py

I did not know about this page. I think that it's a mistake to publish "contributors" in this list. First of all, it's unclear if all these people even want to be considered contributors to WebKit - you add someone when you CC them to ask questions, but they can be spec authors, area experts, and not necessarily direct contributors.

Second, publishing this list makes it sounds like a list of fame, which it is not. In fact, a new contributor is more likely to get on the list if he's a poor engineer, breaks things often, and thus needs to be CC'ed on follow-up bugs.

- WBR, Alexey Proskuryakov

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-help/attachments/20120311/142114c3/attachment-0001.html>

------------------------------

Message: 2
Date: Sun, 11 Mar 2012 15:50:53 -0400
From: Antonio Gomes <tonikitoo at gmail.com>
To: Alexey Proskuryakov <ap at webkit.org>
Cc: "webkit-help at lists.webkit.org" <webkit-help at lists.webkit.org>
Subject: Re: [webkit-help] Contributor requirements?
Message-ID:
<CAANoYzOeCbJKaNy_JZLwkkma9WMowZoJ1nXNhhOVApo1Dd4W+g at mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

Btw, "commit-queue" should (if anything) be a committer, at least :-)

2012/3/11 Alexey Proskuryakov <ap at webkit.org>

>
> 10.03.2012, ? 23:50, Ryosuke Niwa ???????(?):
>
> http://www.webkit.org/team.html is a better list of contributors, which
> is pulled from
> http://trac.webkit.org/browser/trunk/Tools/Scripts/webkitpy/common/config/committers.py
>
>
> I did not know about this page. I think that it's a mistake to publish
> "contributors" in this list. First of all, it's unclear if all these people
> even want to be considered contributors to WebKit - you add someone when
> you CC them to ask questions, but they can be spec authors, area experts,
> and not necessarily direct contributors.
>
> Second, publishing this list makes it sounds like a list of fame, which it
> is not. In fact, a new contributor is more likely to get on the list if
> he's a poor engineer, breaks things often, and thus needs to be CC'ed on
> follow-up bugs.
>
> - WBR, Alexey Proskuryakov
>
>
> _______________________________________________
> webkit-help mailing list
> webkit-help at lists.webkit.org
> http://lists.webkit.org/mailman/listinfo.cgi/webkit-help
>
>


-- 
--Antonio Gomes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-help/attachments/20120311/365c8901/attachment-0001.html>

------------------------------

Message: 3
Date: Mon, 12 Mar 2012 15:04:33 +0800 
From: <bins_mail at sina.com>
To: "webkit-help" <webkit-help at lists.webkit.org>
Subject: [webkit-help] JSC How to obtain an available JSContext object
in native C function
Message-ID: <20120312070433.26F3C9E8001 at webmail.sinamail.sina.com.cn>
Content-Type: text/plain; charset="gbk"



Dear Sirs:
I decide to use the JavascriptCore's API of the Webkit-1.2.7 to do some interactions between C code and javascript. Now I find it difficultied to get an appropriate JSContextRef when I intend to use it to call a Javascript function in the native C method. I have tried some functions in the JSContextRef.h, but it seemed that did not work well.
Here is part of my codes:
...
static void
on_foo(gpointer user_data)
{
...
JSGlobalContextRef context = JSGlobalContextCreateInGroup(NULL, NULL);

JSStringRef body = JSStringCreateWithUTF8CString("alert(\"Hello World\");");

JSObjectRef function = JSObjectMakeFunction(context, NULL, 0, NULL, body, NULL, 0, NULL);

JSValueRef result = JSObjectCallAsFunction(context,function, NULL, 0, NULL, 0);
...
}
...
on_foo is a native callback in C code part and it seems that the javascript function "alert()" will not be called due to the context object not handling well. So how should I modify my code to build a right jscontext ref ?

Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-help/attachments/20120312/26bbffe2/attachment-0001.html>

------------------------------

Message: 4
Date: Mon, 12 Mar 2012 08:15:06 +0100
From: "=?iso-8859-1?B?RmxlbW1pbmcgSC4gU/hyZW5zZW4=?="
<flemming.sorensen at pyro-os.org>
To: "webkit-help" <webkit-help at lists.webkit.org>
Subject: [webkit-help] Need trunk r29940
Message-ID: <20120312071514.7F2B0FC20B5 at lists.macosforge.org>
Content-Type: text/plain; charset="iso-8859-1"

Hello,

First of all, I hope I choose the right list, but in case I didn't, I will greatly appreciate pointers, in the right direction.

The story is this; A few years ago, WebKit was ported to the Syllable operating system, but as always, nothing ever got upstream. To make matters worse, the guy who ported it, disappeared from the project, and never released the patches, only the modified source.
I've been looking in the .svn directory (fortunately that was still intact), and it seems like the trunk used, was r29940 for both WebCore, and JavaScriptCore.

We (a fork of Syllable) want to update that port, and naturally I may be mistaking, but I do believe the best way would be to create a set of patches, and for that I would need a clean trunk. Now, I can only find r29933 and r29946, on your website, so I was wondering if there was somewhere else I could look, and hopefully find, r29940.


Best regards
Flemming H. S?rensen
The Pyro OS Team

------------------------------

_______________________________________________
webkit-help mailing list
webkit-help at lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-help


End of webkit-help Digest, Vol 33, Issue 16
*******************************************
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-help/attachments/20120312/8c485dff/attachment.html>


More information about the webkit-help mailing list