diff options
author | Giovanni Campagna <gcampagna@src.gnome.org> | 2014-02-24 13:47:49 +0100 |
---|---|---|
committer | Giovanni Campagna <gcampagna@src.gnome.org> | 2014-02-26 01:52:04 +0100 |
commit | 9680de88d444d6b7f5eb289f4c92f22c79e8b267 (patch) | |
tree | fd85d277f33bae66b9c868a131f61e2fc163d89b | |
parent | 58ab20d8b8dea9365a9826b2f18e5167dc9a9201 (diff) | |
download | gjs-9680de88d444d6b7f5eb289f4c92f22c79e8b267.tar.gz |
fundamental: assert that priv is not NULL if we are on the right JSClass
We don't have custom inheritance for fundamental types, so we don't
need to run JS code before the C object is constructed.
https://bugzilla.gnome.org/show_bug.cgi?id=725061
-rw-r--r-- | gi/fundamental.cpp | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/gi/fundamental.cpp b/gi/fundamental.cpp index a3c3a2f2..1cb2a198 100644 --- a/gi/fundamental.cpp +++ b/gi/fundamental.cpp @@ -896,16 +896,7 @@ gjs_typecheck_fundamental(JSContext *context, return JS_FALSE; priv = priv_from_js(context, object); - - if (priv == NULL) { - if (throw_error) { - gjs_throw(context, - "Fundamental instance or prototype has not been properly initialized yet. " - "Did you forget to chain-up from _init()?"); - } - - return JS_FALSE; - } + g_assert(priv != NULL); if (priv->gfundamental == NULL) { if (throw_error) { |