Граф коммитов

30 Коммитов

Автор SHA1 Сообщение Дата
Tooru Fujisawa cc92ef732d Bug 1708448 - Move property and element functions into js/public/PropertyAndElement.h. r=nbp
Differential Revision: https://phabricator.services.mozilla.com/D119619
2021-07-13 11:52:42 +00:00
Simon Giesecke 971b645fe3 Bug 1660470 - Add missing include directives/forward declarations. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D87865
2020-11-23 16:21:38 +00:00
Jan de Mooij 6febd292ea Bug 1586683 - Remove flat strings from JSAPI. r=jwalden,bzbarsky
We want to remove flat strings (JSFlatString). With this patch we only expose
linear strings (JSLinearString) to API consumers.

This is very mechanical for the most part, because code typically only cares
about linear strings and not the null-termination aspect.

CTypes's Library.cpp has some Windows-specific code where we relied on null-terminated
strings. This patch adds JS_CopyStringCharsZ for that use case.

Differential Revision: https://phabricator.services.mozilla.com/D48314

--HG--
extra : moz-landing-system : lando
2019-10-14 09:32:07 +00:00
Steve Fink 91b1ffaac3 Bug 1560667 - Collection of fixes for things uncovered by improvements to the hazard analysis. r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D46534

--HG--
extra : moz-landing-system : lando
2019-10-02 03:20:33 +00:00
Boris Zbarsky 44c015a4b0 Bug 1584431 part 4. Use the new length-aware versions of JS_StringEqualsAscii and JS_FlatStringEqualsAscii where possible. r=jwalden
Differential Revision: https://phabricator.services.mozilla.com/D47393

--HG--
extra : moz-landing-system : lando
2019-09-27 21:25:23 +00:00
Sylvestre Ledru e226046cb8 Bug 1547143 - Format the tree: Be prescriptive with the pointer style (left) r=Ehsan
# ignore-this-changeset

Depends on D28954

Differential Revision: https://phabricator.services.mozilla.com/D28956

--HG--
extra : moz-landing-system : lando
2019-05-01 08:47:10 +00:00
Sylvestre Ledru 265e672179 Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset

--HG--
extra : amend_source : 4d301d3b0b8711c4692392aa76088ba7fd7d1022
2018-11-30 11:46:48 +01:00
Gabriele Svelto 19e52bebd4 Bug 1510582 - Remove useless inclusions of Services.h r=erahm
Differential Revision: https://phabricator.services.mozilla.com/D13240

--HG--
extra : moz-landing-system : lando
2018-11-28 17:25:23 +00:00
Ehsan Akhgari 6bbaf2cf8c Bug 1489147 - Remove the XPCOM component registration for nsXPConnect; r=mccr8
We move the XPConnect() singleton accessor to nsIXConnect to make it available for consumers outside of XPConnect.  Most of the consumers of the singleton accessor just need the nsIXPConnect public interface, except for the IsShuttingDown() member which this patch adds to nsIXPConnect as well.

Differential Revision: https://phabricator.services.mozilla.com/D5151
2018-09-06 16:39:35 -04:00
shindli 2a86142e74 Backed out changeset d4ae1994c20c (bug 1489147) for bustages in JSDebugger.cpp on a CLOSED TREE 2018-09-06 22:12:44 +03:00
Ehsan Akhgari bb7fcd9d69 Bug 1489147 - Remove the XPCOM component registration for nsXPConnect; r=mccr8
We move the XPConnect() singleton accessor to nsIXConnect to make it available for consumers outside of XPConnect.  Most of the consumers of the singleton accessor just need the nsIXPConnect public interface, except for the IsShuttingDown() member which this patch adds to nsIXPConnect as well.

Differential Revision: https://phabricator.services.mozilla.com/D5151
2018-09-06 14:52:07 -04:00
Tom Schuster d55955aaf6 Bug 1255800 - Remove JS_THIS_OBJECT from mozStorageStatementJSHelper. r=mrbkap
--HG--
extra : rebase_source : 626469757176f8843cbbb343d1b9f85e1b44a1c3
2018-03-22 16:42:03 +01:00
Andrew McCreight e93350bfee Bug 1414441 - Stop caching an XPConnect pointer in storage/. r=mak
Services.h has a built in cache now

MozReview-Commit-ID: 362qIrzf13F

--HG--
extra : rebase_source : f7fc218fc02d6ec6aa4b0d9479d2b972780389ec
2017-11-03 15:50:29 -07:00
Jan de Mooij 2cc6df95c3 Bug 1392554 - Port (Async)StatementParams to WebIDL bindings. r=asuth,qdot 2017-08-24 10:52:52 +02:00
Jan de Mooij 3912244f0b Bug 1390489 - Port StatementRow to WebIDL bindings. r=asuth,qdot 2017-08-22 09:25:37 +02:00
Jan de Mooij b8c43d4666 Bug 1390147 - Remove getProperty Class hook from StatementJSHelper and AsyncStatementJSHelper. r=mrbkap 2017-08-15 16:16:07 +02:00
Bevis Tseng d1637b9c5a Bug 1372453 - Part 2: Name the caller of ProxyReleaseEvent. r=billm
MozReview-Commit-ID: LYhSWnZkq0i
2017-06-14 09:27:17 +08:00
Nicholas Nethercote bf48aecf29 Bug 1332172 - Remove XPC_MAP_WANT_*. r=mccr8.
nsIXPCScriptable flags handling in xpc_map_end.h is a bit of a mess.

- Half the flags relate to whether various functions are defined (PreCreate,
  GetProperty, etc). These are set using the XPC_MAP_WANT_* macros;
  for each one xpc_map_end.h  inserts the corresponding flag using the
  preprocessor (see XPC_MAP_CLASSNAME::GetScriptableFlags()).

- The other half of the flags relate to other things (IS_GLOBAL_OBJECT,
  DONT_REFLECT_INTERFACE_NAMES, etc). These are set using the XPC_MAP_FLAGS
  macro.

Having two similar but different mechanisms to set the flags for a class is
confusing. (Indeed, until recently we had some classes where a single flag was
redundantly specified via both mechanisms.) Note also that the classes done in
dom/base/nsIDOMClassInfo.h also specify all the flags in a single value,
similar to how XPC_MAP_FLAGS works.

This patch removes the XPC_MAP_WANT_* macros. All flags are now set
via XPC_MAP_FLAGS. This is a significant simplification to xpc_map_end.h and
all the places that use it.

The downside of this change is that I had to change the flag constants from
class constants (i.e. nsIXPCScriptable::FOO) to macros (i.e.
NSIXPCSCRIPTABLE_FOO) because they need to be used in #if statements like this
in xpc_map_end.h:

  #if !((XPC_MAP_FLAGS) & NSIXPCSCRIPTABLE_WANT_PRECREATE)

and you can't use a '::'-qualified name inside a #if. I think this downside is
outweighed by the simplification described above.

Overall the patch removes 80 lines of code.

--HG--
extra : rebase_source : 6d5c341d0deba8f1529d81c17bb8819e09620b05
2017-01-23 13:33:58 +11:00
Nicholas Nethercote df925b776c Bug 1321374 - Simplify js::Class handling relating to nsIXPCScriptable. r=mccr8, sr=bholley.
This patch removes XPCNativeScriptableShared and XPCNativeScriptableSharedMap,
which results in a net reduction of ~100 lines of code.
2016-12-14 08:33:46 +11:00
Tooru Fujisawa 6d493d48ec Bug 1289050 - Part 1: Use ASCII variant of JS_ReportError in simple case. r=jwalden 2016-08-14 20:39:28 +09:00
Nathan Froyd 01583602a9 Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat
The bulk of this commit was generated with a script, executed at the top
level of a typical source code checkout.  The only non-machine-generated
part was modifying MFBT's moz.build to reflect the new naming.

CLOSED TREE makes big refactorings like this a piece of cake.

 # The main substitution.
find . -name '*.cpp' -o -name '*.cc' -o -name '*.h' -o -name '*.mm' -o -name '*.idl'| \
    xargs perl -p -i -e '
 s/nsRefPtr\.h/RefPtr\.h/g; # handle includes
 s/nsRefPtr ?</RefPtr</g;   # handle declarations and variables
'

 # Handle a special friend declaration in gfx/layers/AtomicRefCountedWithFinalize.h.
perl -p -i -e 's/::nsRefPtr;/::RefPtr;/' gfx/layers/AtomicRefCountedWithFinalize.h

 # Handle nsRefPtr.h itself, a couple places that define constructors
 # from nsRefPtr, and code generators specially.  We do this here, rather
 # than indiscriminantly s/nsRefPtr/RefPtr/, because that would rename
 # things like nsRefPtrHashtable.
perl -p -i -e 's/nsRefPtr/RefPtr/g' \
     mfbt/nsRefPtr.h \
     xpcom/glue/nsCOMPtr.h \
     xpcom/base/OwningNonNull.h \
     ipc/ipdl/ipdl/lower.py \
     ipc/ipdl/ipdl/builtin.py \
     dom/bindings/Codegen.py \
     python/lldbutils/lldbutils/utils.py

 # In our indiscriminate substitution above, we renamed
 # nsRefPtrGetterAddRefs, the class behind getter_AddRefs.  Fix that up.
find . -name '*.cpp' -o -name '*.h' -o -name '*.idl' | \
    xargs perl -p -i -e 's/nsRefPtrGetterAddRefs/RefPtrGetterAddRefs/g'

if [ -d .git ]; then
    git mv mfbt/nsRefPtr.h mfbt/RefPtr.h
else
    hg mv mfbt/nsRefPtr.h mfbt/RefPtr.h
fi

--HG--
rename : mfbt/nsRefPtr.h => mfbt/RefPtr.h
2015-10-18 01:24:48 -04:00
Jan de Mooij 9d74419a90 Bug 1184564 part 2 - Use Value instead of jsval in dom/ and storage/. r=bz 2015-07-18 21:45:35 +02:00
Andrew McCreight 53e8d2ac49 Bug 958641 - De-holder nsIXPConnect::WrapNative. r=gabor 2015-07-01 11:17:17 -07:00
Jan de Mooij 303b210317 Bug 1177892 part 3 - Remove OBJECT_TO_JSVAL. r=evilpie 2015-06-30 21:09:46 -07:00
Jan de Mooij 155b1afd35 Bug 1177892 part 1 - Remove BOOLEAN_TO_JSVAL and STRING_TO_JSVAL. r=evilpie 2015-06-30 11:20:56 -07:00
Ryan VanderMeulen 7483c0563e Backed out changesets ad58c270ce87 and 849151330d60 (bug 1177892) for B2G bustage.
CLOSED TREE
2015-06-30 15:48:11 -04:00
Jan de Mooij 731f441d6e Bug 1177892 part 1 - Remove BOOLEAN_TO_JSVAL and STRING_TO_JSVAL. r=evilpie
--HG--
extra : rebase_source : f7ae63c351c82516e7db48a12c4cfb2048a81805
2015-06-30 11:20:56 -07:00
Jan de Mooij 976586cb5f Bug 1177825 - Remove JSVAL_* constants. r=evilpie 2015-06-29 18:36:44 -07:00
Jason Orendorff 112cb52d91 Bug 1140482 - Add JSPROP_RESOLVING. Give NativeDefineProperty standard behavior in cases where a non-resolving define needs to trigger a resolve hook. r=Waldo.
--HG--
extra : rebase_source : c63bb83179ec98e9f93ebb86cb488d65f980a07e
2015-05-01 14:03:17 -05:00
Birunthan Mohanathas 296aa63730 Bug 1164717 - Flatten storage/src/ directory. r=mak
--HG--
rename : storage/src/FileSystemModule.cpp => storage/FileSystemModule.cpp
rename : storage/src/FileSystemModule.h => storage/FileSystemModule.h
rename : storage/src/IStorageBindingParamsInternal.h => storage/IStorageBindingParamsInternal.h
rename : storage/src/SQLCollations.cpp => storage/SQLCollations.cpp
rename : storage/src/SQLCollations.h => storage/SQLCollations.h
rename : storage/src/SQLiteMutex.h => storage/SQLiteMutex.h
rename : storage/src/StorageBaseStatementInternal.cpp => storage/StorageBaseStatementInternal.cpp
rename : storage/src/StorageBaseStatementInternal.h => storage/StorageBaseStatementInternal.h
rename : storage/src/TelemetryVFS.cpp => storage/TelemetryVFS.cpp
rename : storage/src/VacuumManager.cpp => storage/VacuumManager.cpp
rename : storage/src/VacuumManager.h => storage/VacuumManager.h
rename : storage/src/Variant.h => storage/Variant.h
rename : storage/src/Variant_inl.h => storage/Variant_inl.h
rename : storage/src/mozStorageArgValueArray.cpp => storage/mozStorageArgValueArray.cpp
rename : storage/src/mozStorageArgValueArray.h => storage/mozStorageArgValueArray.h
rename : storage/src/mozStorageAsyncStatement.cpp => storage/mozStorageAsyncStatement.cpp
rename : storage/src/mozStorageAsyncStatement.h => storage/mozStorageAsyncStatement.h
rename : storage/src/mozStorageAsyncStatementExecution.cpp => storage/mozStorageAsyncStatementExecution.cpp
rename : storage/src/mozStorageAsyncStatementExecution.h => storage/mozStorageAsyncStatementExecution.h
rename : storage/src/mozStorageAsyncStatementJSHelper.cpp => storage/mozStorageAsyncStatementJSHelper.cpp
rename : storage/src/mozStorageAsyncStatementJSHelper.h => storage/mozStorageAsyncStatementJSHelper.h
rename : storage/src/mozStorageAsyncStatementParams.cpp => storage/mozStorageAsyncStatementParams.cpp
rename : storage/src/mozStorageAsyncStatementParams.h => storage/mozStorageAsyncStatementParams.h
rename : storage/src/mozStorageBindingParams.cpp => storage/mozStorageBindingParams.cpp
rename : storage/src/mozStorageBindingParams.h => storage/mozStorageBindingParams.h
rename : storage/src/mozStorageBindingParamsArray.cpp => storage/mozStorageBindingParamsArray.cpp
rename : storage/src/mozStorageBindingParamsArray.h => storage/mozStorageBindingParamsArray.h
rename : storage/src/mozStorageConnection.cpp => storage/mozStorageConnection.cpp
rename : storage/src/mozStorageConnection.h => storage/mozStorageConnection.h
rename : storage/src/mozStorageError.cpp => storage/mozStorageError.cpp
rename : storage/src/mozStorageError.h => storage/mozStorageError.h
rename : storage/src/mozStoragePrivateHelpers.cpp => storage/mozStoragePrivateHelpers.cpp
rename : storage/src/mozStoragePrivateHelpers.h => storage/mozStoragePrivateHelpers.h
rename : storage/src/mozStorageResultSet.cpp => storage/mozStorageResultSet.cpp
rename : storage/src/mozStorageResultSet.h => storage/mozStorageResultSet.h
rename : storage/src/mozStorageRow.cpp => storage/mozStorageRow.cpp
rename : storage/src/mozStorageRow.h => storage/mozStorageRow.h
rename : storage/src/mozStorageSQLFunctions.cpp => storage/mozStorageSQLFunctions.cpp
rename : storage/src/mozStorageSQLFunctions.h => storage/mozStorageSQLFunctions.h
rename : storage/src/mozStorageService.cpp => storage/mozStorageService.cpp
rename : storage/src/mozStorageService.h => storage/mozStorageService.h
rename : storage/src/mozStorageStatement.cpp => storage/mozStorageStatement.cpp
rename : storage/src/mozStorageStatement.h => storage/mozStorageStatement.h
rename : storage/src/mozStorageStatementData.h => storage/mozStorageStatementData.h
rename : storage/src/mozStorageStatementJSHelper.cpp => storage/mozStorageStatementJSHelper.cpp
rename : storage/src/mozStorageStatementJSHelper.h => storage/mozStorageStatementJSHelper.h
rename : storage/src/mozStorageStatementParams.cpp => storage/mozStorageStatementParams.cpp
rename : storage/src/mozStorageStatementParams.h => storage/mozStorageStatementParams.h
rename : storage/src/mozStorageStatementRow.cpp => storage/mozStorageStatementRow.cpp
rename : storage/src/mozStorageStatementRow.h => storage/mozStorageStatementRow.h
rename : storage/src/variantToSQLiteT_impl.h => storage/variantToSQLiteT_impl.h
2015-05-19 10:47:33 -07:00