Bernd Buschinski | 1 Jun 2012 14:34

Re: Review Request: KJS: Implement Object.GetOwnPropertyDescriptor & Object.DefineProperty

This is an automatically generated e-mail. To reply, visit: http://git.reviewboard.kde.org/r/104515/

Review request for kdelibs.
By Bernd Buschinski.

Updated June 1, 2012, 12:34 p.m.

Changes

And here have the correct version of the patch. The last version lacked the updated defineOwnProperty for arguments

Description

KJS: Implement Object.GetOwnPropertyDescriptor & Object.DefineProperty This is a pretty big patch, to get Object.defineProperty perfect for ecmascript (for all tests that only use implemented stuff, all test that use Object.create for example will fail, as its not implemented) PropertyDescriptor: Necessary for collectiong data, this introduce new CommonIdentifiers.h, this might requiere to rebuild khtml against new kjs, otherwise it might cause weird crashes (at least for me) object.h: Beside from adding new getPropertyDescriptor & getOwnPropertyDescriptor & defineOwnProperty, the important changes are making getPropertyAttributes, put/get/remove-Direct virtual. Why do I need that? Because put checks if the prototype already has property XYZ and uses it. Now imagine an array that got a setter-only property via a prototype. DefineProperty would try to use put, which uses the prototype property and it would fail. So all custom-data classes like Array need to implement/use put/get/remove-Direct. object.cpp: currently put on a setter-only property would always throw an exception, this is only correct for strict-mode, as we currently do not check for strict-mode it would make more sense to change it to default not throwing an exception. array.cpp/h: The old Array implementation did not store attributes for array indexes, I rewrote it to also store the attributes. + Bonus: also fix getOwnPropertyNames, as we now store attributes. + use new attributes, reject put/delete/enum if set function.cpp (Arguments) changed the default attributes how parameter are stored, according to ECMA 10.6.11.b Rest is "just" the defineProperty implementation

Testing

ecmascript & daily surfing used valgrind on many array testcases to check for possible memleaks

Diffs (updated)

  • kjs/CMakeLists.txt (1188064)
  • kjs/CommonIdentifiers.h (8ee40e8)
  • kjs/array_instance.h (3f2b630)
  • kjs/array_instance.cpp (fe9b8b4)
  • kjs/function.h (3757fe8)
  • kjs/function.cpp (5f39ae6)
  • kjs/object.h (047c242)
  • kjs/object.cpp (c19122f)
  • kjs/object_object.cpp (986f03f)
  • kjs/operations.h (f8a28c8)
  • kjs/operations.cpp (d4c0066)
  • kjs/propertydescriptor.h (PRE-CREATION)
  • kjs/propertydescriptor.cpp (PRE-CREATION)

View Diff

Bernd Buschinski | 1 Jun 2012 15:30

Re: Review Request: kjs: Implement JSON.stringify

This is an automatically generated e-mail. To reply, visit: http://git.reviewboard.kde.org/r/105057/

Review request for kdelibs.
By Bernd Buschinski.

Updated June 1, 2012, 1:30 p.m.

Changes

- properly remember holder - fixes crash for js code like var b = 42; function white(a,b,c) { return 10; } var o = JSON.stringify(b, white);

Description

kjs: Implement JSON.stringify patch needs https://git.reviewboard.kde.org/r/105056/ (JSON.parse)

Diffs (updated)

  • kjs/CMakeLists.txt (1188064)
  • kjs/CommonIdentifiers.h (8ee40e8)
  • kjs/json_object.h (PRE-CREATION)
  • kjs/json_object.cpp (PRE-CREATION)
  • kjs/jsonstringify.h (PRE-CREATION)
  • kjs/jsonstringify.cpp (PRE-CREATION)

View Diff

Bernd Buschinski | 1 Jun 2012 16:56

Re: Review Request: kjs: Implement Object.create

This is an automatically generated e-mail. To reply, visit: http://git.reviewboard.kde.org/r/104630/

Review request for kdelibs.
By Bernd Buschinski.

Updated June 1, 2012, 2:56 p.m.

Changes

I gravely misinterpreted "If Type(O) is not Object or Null throw a TypeError exception." as if (!O->isObject || O->isNull()) throw but it was meant as if (!(O->isObject || O->isNull())) throw as we now have, but we can't get an Object out of Null, so we have to set it differently

Description

This needs https://git.reviewboard.kde.org/r/104629/ Object.defineProperties Strictly implemented to ecma 15.2.3.5 Object.create

Testing

ecmascript & daily surfing

Diffs (updated)

  • kjs/object_object.cpp (986f03f)

View Diff

Commit Hook | 1 Jun 2012 17:03
Picon
Favicon

Re: Review Request: Remove additional directories from shortcuts scheme export path

This is an automatically generated e-mail. To reply, visit: http://git.reviewboard.kde.org/r/104981/

This review has been submitted with commit 4258050d3e7c1810b429e2cf0103c71ae9f7d600 by Burkhard Lück to branch KDE/4.8.

- Commit


On May 27th, 2012, 7:17 p.m., Burkhard Lück wrote:

Review request for kdelibs, Andreas Pakulat and Alexander Dymo.
By Burkhard Lück.

Updated May 27, 2012, 7:17 p.m.

Description

The Configure Shortcuts dialog has an Action to export a scheme (Details->More Actions->Export Scheme) Using this action the user is asked for a export location and has to select a directory. Then the current scheme 'schemename' in application 'appname' is exported to a file named appnameschemenameshortcuts.rc. But this file is not saved in the selected directory as Joe User would expect, but in shortcuts/share/apps/appname/ below the selected folder. This patch removes the additional directories shortcuts/share/apps/appname/ from the export path to make it easier for the user to find the scheme file and move/copy it via command line (there is no GUI to import a scheme).

Diffs

  • kdeui/dialogs/kshortcutschemeseditor.cpp (34a485a)

View Diff

Bernd Buschinski | 1 Jun 2012 19:33

Re: Review Request: kjs: Implement Object.create

This is an automatically generated e-mail. To reply, visit: http://git.reviewboard.kde.org/r/104630/

Review request for kdelibs.
By Bernd Buschinski.

Updated June 1, 2012, 5:33 p.m.

Changes

the object-null check was just wrong. Sorry for the spam, not my coding day, will stop for now...

Description

This needs https://git.reviewboard.kde.org/r/104629/ Object.defineProperties Strictly implemented to ecma 15.2.3.5 Object.create

Testing

ecmascript & daily surfing

Diffs (updated)

  • kjs/object_object.cpp (986f03f)

View Diff

Rolf Eike Beer | 1 Jun 2012 23:06
Picon
Favicon

Re: Review Request: KJS: Implement Object.GetOwnPropertyDescriptor & Object.DefineProperty

This is an automatically generated e-mail. To reply, visit: http://git.reviewboard.kde.org/r/104515/

On April 29th, 2012, 6:26 p.m., Maks Orlovich wrote:

kjs/object.cpp (Diff revision 4) 433
bool JSObject::defineOwnProperty(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& desc, bool shouldThrow)
GetterSetterImp *gs = new GetterSetterImp();
more * inconsistency

On April 30th, 2012, 7:11 p.m., Bernd Buschinski wrote:

I don't get the problem here, could you please explain?
GetterSetterImp *gs -> GetterSetterImp* gs

- Rolf Eike


On June 1st, 2012, 12:34 p.m., Bernd Buschinski wrote:

Review request for kdelibs.
By Bernd Buschinski.

Updated June 1, 2012, 12:34 p.m.

Description

KJS: Implement Object.GetOwnPropertyDescriptor & Object.DefineProperty This is a pretty big patch, to get Object.defineProperty perfect for ecmascript (for all tests that only use implemented stuff, all test that use Object.create for example will fail, as its not implemented) PropertyDescriptor: Necessary for collectiong data, this introduce new CommonIdentifiers.h, this might requiere to rebuild khtml against new kjs, otherwise it might cause weird crashes (at least for me) object.h: Beside from adding new getPropertyDescriptor & getOwnPropertyDescriptor & defineOwnProperty, the important changes are making getPropertyAttributes, put/get/remove-Direct virtual. Why do I need that? Because put checks if the prototype already has property XYZ and uses it. Now imagine an array that got a setter-only property via a prototype. DefineProperty would try to use put, which uses the prototype property and it would fail. So all custom-data classes like Array need to implement/use put/get/remove-Direct. object.cpp: currently put on a setter-only property would always throw an exception, this is only correct for strict-mode, as we currently do not check for strict-mode it would make more sense to change it to default not throwing an exception. array.cpp/h: The old Array implementation did not store attributes for array indexes, I rewrote it to also store the attributes. + Bonus: also fix getOwnPropertyNames, as we now store attributes. + use new attributes, reject put/delete/enum if set function.cpp (Arguments) changed the default attributes how parameter are stored, according to ECMA 10.6.11.b Rest is "just" the defineProperty implementation

Testing

ecmascript & daily surfing used valgrind on many array testcases to check for possible memleaks

Diffs

  • kjs/CMakeLists.txt (1188064)
  • kjs/CommonIdentifiers.h (8ee40e8)
  • kjs/array_instance.h (3f2b630)
  • kjs/array_instance.cpp (fe9b8b4)
  • kjs/function.h (3757fe8)
  • kjs/function.cpp (5f39ae6)
  • kjs/object.h (047c242)
  • kjs/object.cpp (c19122f)
  • kjs/object_object.cpp (986f03f)
  • kjs/operations.h (f8a28c8)
  • kjs/operations.cpp (d4c0066)
  • kjs/propertydescriptor.h (PRE-CREATION)
  • kjs/propertydescriptor.cpp (PRE-CREATION)

View Diff

Albert Astals Cid | 3 Jun 2012 18:59
Picon
Favicon
Gravatar

Please fix nepomuk-core buildsystem

I find it quite annoying that it tells me

-- Soprano version 2.7.5 is too old. Please install 2.7.56 or newer

and then tells me

-----------------------------------------------------------------------------
-- The following external packages were located on your system.
-- This installation will have the extra features provided by these packages.
-----------------------------------------------------------------------------
   * Soprano - Soprano is the Qt-based RDF storage and parsing solution

-----------------------------------------------------------------------------
-- Congratulations! All external packages have been found.
-----------------------------------------------------------------------------

If i get a "Congratulations!" message I expect that it will build.

Cheers,
  Albert

Albert Astals Cid | 3 Jun 2012 20:26
Picon
Favicon
Gravatar

Please fix kde-runtime buildsystem

If kactivities is not found it gives

-----------------------
CMake Error at 
plasma/declarativeimports/plasmaextracomponents/CMakeLists.txt:3 
(find_package):
  Could not find module FindKActivities.cmake or a configuration file for
  package KActivities.

  Adjust CMAKE_MODULE_PATH to find FindKActivities.cmake or set
  KActivities_DIR to the directory containing a CMake configuration file for
  KActivities.  The file will have one of the following names:

    KActivitiesConfig.cmake
    kactivities-config.cmake
-----------------------

It should use a proper macro_log_feature reporting system.

Cheers,
  Albert

Albert Astals Cid | 3 Jun 2012 20:51
Picon
Favicon
Gravatar

Please fix kde-runtime buildsystem (2nd issue)

It seems kde-runtime needs shared-desktop-ontologies 0.9

I would a macro_log_feature error instead of  
nepomuk/kioslaves/nepomuk/resourcepagegenerator.cpp failing to compile

Cheers,
  Albert

Albert Astals Cid | 3 Jun 2012 23:45
Picon
Favicon
Gravatar

Re: Extra KDE Telepathy modules moving to Extragear

El Dijous, 31 de maig de 2012, a les 20:10:08, David Edmundson va escriure:
> On Mon, Apr 30, 2012 at 11:28 PM, David Edmundson
> 
> <david <at> davidedmundson.co.uk> wrote:
> > On Sun, Apr 29, 2012 at 2:42 PM, Kevin Krammer <krammer <at> kde.org> wrote:
> >> On Sunday, 2012-04-29, Martin Klapetek wrote:
> >>> On Sat, Apr 28, 2012 at 22:44, Kevin Krammer <krammer <at> kde.org> wrote:
> >>> > On Saturday, 2012-04-28, George Kiagiadakis wrote:
> >>> > > No, the classes that wrap GObjects do not need a d-pointer. All the
> >>> > > calls are forwarded to the underlying GObject and if for any reason
> >>> > > we
> >>> > > ever need to save extra data on the wrapper class (which is highly
> >>> > > unlikely), we should use the GObject qdata for that. Wrapper classes
> >>> > > may be destroyed and re-allocated by QtGLib and therefore they
> >>> > > shouldn't hold any data.
> >>> > 
> >>> > So the GObject has a d-pointer?
> >>> > 
> >>> > Any specific reason there is a GObject at all? My very basic
> >>> > understanding of
> >>> > Telepathy was that it is D-Bus based services.
> >>> 
> >>> Telepathy is based on D-Bus services, however this is about Telepathy
> >>> logger [1], which is a GObject-based implementation of a central logging
> >>> Telepathy component, which does not use D-Bus for sending the logs as it
> >>> is
> >>> quite heavy data and D-Bus for this purpose is rather slow, so it
> >>> provides
> >>> a direct access API.
> >> 
> >> The documentation you linked to seems to be quite of of date (most of the
> >> links in it don't work), so I would still need some clarifications.
> >> 
> >> The document claims that the logger is an independent service, i.e. it
> >> says: "Telepathy Logger is a session daemon".
> >> 
> >> I quite don''t understand the term direct access API in the context of a
> >> daemon.
> >> 
> >> Usually daemon refers to a separate process. Communicating with a process
> >> is to my best understanding never done by linking the daemon code into
> >> the client applications.
> > 
> > Yes, starts whilst you're chatting. Closes when you're done.
> > 
> >> My best guess so far is that there is some library that provides
> >> read-only
> >> access to files the independent logger writes onto disk.
> > 
> > Your guess is effectively correct. Telepathy-logger is a bit more
> > complex as it writes to and reads from multiple backends.
> > XML files or SQLite and it also reads (read only) Pidgin log files as
> > their way of importing old log files.
> > 
> >>> Our telepathy-logger-qt, which we want to move to
> >>> Extragear, basically just wraps the original logger into Qt-like API, so
> >>> that it can be used with Qt/KDE apps easily.
> >> 
> >> Based on my guess I would strongly recommend to put the wrapped GObject
> >> into the wrapper's d-pointer. Otherwise your only way of ever
> >> implementing that natively is to name a struct GObject and use that as
> >> the native
> >> implementation's d-pointer, making it very hard for any using application
> >> to link with any library exposing GObject symbols.
> > 
> > If we ever implemented it natively I would make so many other changes
> > to the API that I would bump the major version number and not even try
> > to keep compatibility.
> > 
> >> Cheers,
> >> Kevin
> >> 
> >>> [1] - http://telepathy.freedesktop.org/wiki/Logger
> >> 
> >> --
> >> Kevin Krammer, KDE developer, xdg-utils developer
> >> KDE user support, developer mentoring
> 
> *bump*
> 
> So to summarise so far:
> There were some issues with call-ui which are now all fixed.
> There were also comments about gobjects in the telepathy-logger and
> d-pointers which I disagree with and have hopefully explained my
> rationale.
> 
> Are there any further objections to moving these forward into extragear?

Yes, my mail about SearchHit struct and  weird \ in pending-search.h seems to 
have been ignored.

Albert

> 
> David Edmundon


Gmane