IP Library Granted Patent US 6,892,200
Granted Patent B2
US 6,892,200 · App. 10/285,043 · Granted May 10, 2005

Javascript engine

View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 6,892,200
App. No.
10/285,043
Granted
May 10, 2005
Kind
B2
Abstract

A JavaScript enhancement is provided that increases performance of the JavaScript by avoiding the use of locking mechanisms in multi-threaded sessions. To do so, an object is deemed owned by a thread exclusively until the script is ended or suspended. Because scripts are typically short and complete quickly, the overhead to start and end a request containing a script is much less than the overhead of locking each and every object access done by the script, on average.

Claims (46)

1. A computer implemented method for avoiding using a locking mechanism when a thread having a context requests to use an object having a scope and having an owner of said scope, said method comprising:

determining if said owner is the same as said context;

if said owner is the same as said context, then avoiding using locking mechanism;

if said owner is not the same as said context, then promoting a lock on said object's scope;

initially setting said object's scope's owner to a current context of a current thread when said object's scope is created;

resetting said object's scope's owner to a second thread's context when said second thread claims exclusive ownership of said scope; and

setting said object's scope's owner to null when said ownership is shaped.

2. A computer implemented method for locking an object having an ownership attribute, wherein a first thread having a first context makes a first request to a JavaScript engine at a first time, said first request comprising using said object, and a second thread having a second context makes a second request to the JavaScript engine at a second and later time, said second request comprising using said object, said method comprising:

said JavaScript engine determining if said first request is finished with said object;

if said first request is not finished with said object, then:

said JavaScript engine comparing said second context of said second thread with said ownership attribute of said object;

if said comparison is different, then suspending said second request until said first request is finished with said object;

said JavaScript engine setting said ownership attribute of said object to null;

said JavaScript engine resuming said second request;

otherwise, said JavaScript engine setting said ownership attribute of said object to said second context and processing said second request.

3. An computer implemented apparatus for avoiding using a locking mechanism when a thread having a context requests to use an object having a scope and having an owner of said scope, said apparatus comprising:

means for determining if said owner is the same as said context;

if said owner is the same as said context, then means for avoiding using locking mechanism;

if said owner is not the same as said context, then means for promoting a lock on said object's scope;

means for initially setting said object's scope's owner to a current context of a current thread when said object's scope is created;

means for resetting said object's scope's owner to a second thread's context when said second thread claims exclusive ownership of said scope; and

means for setting said object's scope's owner to null when said ownership is shared.

4. An computer implemented apparatus for locking an object having an ownership attribute, wherein a first thread having a first context makes a first request to a JavaScript engine at a first time, said first request comprising using said object, and a second thread having a second context makes a second request to the JavaScript engine at a second and later time, said second request comprising using said object, said apparatus comprising:

means for said JavaScript engine determining if said first request is finished with said object;

if said first request is not finished with said object, then:

means for said JavaScript engine comparing said second context of said second thread with said ownership attribute of said object;

if said comparison is different, then means for suspending said second request until said first request is finished with said object;

means for said JavaScript engine setting said ownership attribute of said object to null;

means for said JavaScript engine resuming said second request;

otherwise, means for said JavaScript engine setting said ownership attribute of said object to said second context and processing said second request.

5. A computer implemented method for locking an object having an ownership attribute, wherein a first thread having a first context makes a first request to a scripting service thread (all cases) engine at a first time, said first request comprising using said object, and a second thread having a second context makes a second request to the scripting engine at a second and later time, said second request comprising using said object, said method comprising:

said scripting engine determining if said first request is finished with said object;

if said first request is not finished with said object, then:

said scripting engine comparing said second context of said second thread with said ownership attribute of said object;

if said comparison is different, then suspending said second request until said first request is finished with said object;

said scripting engine setting said ownership attribute of said object to null;

said scripting engine resuming said second request;

otherwise, said scripting engine setting said ownership attribute of said object to said second context and processing said second request.

6. A computer implemented apparatus for locking an object having an ownership attribute, wherein a first thread having a first context makes a first request to a scripting engine at a first time, said first request comprising using said object, and a second thread having a second context makes a second request to the scripting engine at a second and later time, said second request comprising using said object, said apparatus comprising:

means for said scripting engine determining if said first request is finished with said object;

if said first request is not finished with said object, then:

means for said scripting t engine comparing said second context of said second thread with said ownership attribute of said object;

if said comparison is different, then means for suspending said second request until said first request is finished with said object;

means for said scripting engine setting said ownership attribute of said object to null;

means for said scripting engine resuming said second request; and

otherwise, means for said scripting engine setting said ownership attribute of said object to said second context and processing said second request.

Assignments (8)
CHANGE OF NAME Recorded Dec 20, 2021
From: FACEBOOK, INC.
To: META PLATFORMS, INC.
Reel/Frame 058961/0436 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jul 3, 2012
From: AOL INC.
To: FACEBOOK, INC.
Reel/Frame 028487/0304 →
TERMINATION AND RELEASE OF SECURITY INTEREST IN PATENT RIGHTS Recorded Nov 16, 2010
From: BANK OF AMERICA, N A
To: AOL INC; AOL ADVERTISING INC; GOING INC; LIGHTNINGCAST LLC; MAPQUEST, INC; NETSCAPE COMMUNICATIONS CORPORATION; QUIGO TECHNOLOGIES LLC; SPHERE SOURCE, INC; TACODA LLC; TRUVEO, INC; YEDDA, INC
Reel/Frame 025323/0416 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Dec 30, 2009
From: AOL LLC
To: AOL INC.
Reel/Frame 023750/0210 →
SECURITY AGREEMENT Recorded Dec 14, 2009
From: AOL INC.; AOL ADVERTISING INC.; BEBO, INC.; ICQ LLC; GOING, INC.; LIGHTNINGCAST LLC; MAPQUEST, INC.; NETSCAPE COMMUNICATIONS CORPORATION; QUIGO TECHNOLOGIES LLC; SPHERE SOURCE, INC.; TACODA LLC; TRUVEO, INC.; YEDDA, INC.
To: BANK OF AMERICAN, N.A. AS COLLATERAL AGENT
Reel/Frame 023649/0061 →
CORRECTIVE ASSIGNMENT TO CORRECT THE NATURE OF CONVEYANCE PREVIOUSLY RECORDED ON REEL 019711 FRAME 0316. ASSIGNOR(S) HEREBY CONFIRMS THE NATURE OF CONVEYANCE IS CHANGE OF NAME. Recorded Mar 25, 2009
From: AMERICA ONLINE, INC.
To: AOL LLC, A DELAWARE LIMITED LIABILITY COMPANY
Reel/Frame 022451/0186 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Aug 17, 2007
From: AMERICA ONLINE, INC.
To: AOL LLC, A DELAWARE LIMITED LIABILITY COMPANY
Reel/Frame 019711/0316 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jan 21, 2003
From: EICH, BRENDAN
To: AMERICA ONLINE, INC.
Reel/Frame 013696/0386 →